数据的基本类型和保存形式

2018-08-02 来源:
兑换后即可解锁本专栏全部课程
高级券X4 兑换
评论
请先登录后再发表评论
发表评论
视频为何无法观看
2020-06-28 17:46:27 回复
0
已经登录,观看视频时,扔提示“请登录后播放”,不知是什么问题
2020-06-28 17:46:27 回复
0
安装成功后,尝试按照课程3操作,但是出现以下信息错误 > mat_a Error: object 'mat_a' not found WARNING: You are configured to use the CRAN mirror at https://cran.rstudio.com/. This mirror supports secure (HTTPS) downloads however your system is unable to communicate securely with the server (possibly due to out of date certificate files on your system). Falling back to using insecure URL for this mirror.
2020-06-28 17:46:27 回复
0
①数据框 df -data.frame(k=1:3,y=c("a","b","c"),z=0) ②转换成矩阵df_1 -as.matrix(df)后,数据类型全部变为chr型;③再转换成数据框df_2 -as.data.frame(df_1) ,数据类型全部变为factor型
2020-06-28 17:46:27 回复
0
转换成矩阵后,数据类型全部变为字符(chr)型;再将这一矩阵转换为数据框后,数据类型全部变为factor型。 ``` > x - data.frame(a=1:3, b=c('A', T, F), c=0) > x a b c 1 1 A 0 2 2 TRUE 0 3 3 FALSE 0 > y - as.matrix(x) > y a b c [1,] "1" "A" "0" [2,] "2" "TRUE" "0" [3,] "3" "FALSE" "0" > z - as.data.frame(y) > z a b c 1 1 A 0 2 2 TRUE 0 3 3 FALSE 0 > str(z) 'data.frame': 3 obs. of 3 variables: $ a: Factor w/ 3 levels "1","2","3": 1 2 3 $ b: Factor w/ 3 levels "A","FALSE","TRUE": 1 3 2 $ c: Factor w/ 1 level "0": 1 1 1 ```
2020-06-28 17:46:27 回复
3
安装成功后,尝试按照课程3操作,但是出现以下信息错误 > mat_a Error: object 'mat_a' not found WARNING: You are configured to use the CRAN mirror at https://cran.rstudio.com/. This mirror supports secure (HTTPS) downloads however your system is unable to communicate securely with the server (possibly due to out of date certificate files on your system). Falling back to using insecure URL for this mirror.
2020-06-28 17:46:27 回复
0
回复 DK爱炖盅
:
这里面有两个问题,首先先说前面的Error,报错说的是工作环境当中没有mat_a,可以首先检查一下mat_a是否顺利创建了,当然也可能后面的第二个问题相关。第二个WARNING,可能和电脑当中安装的防火墙相关。可以考虑停止防火墙,重新安装RStudio。
2020-06-28 17:46:27 回复
0
视频为何无法观看
2020-06-28 17:46:27 回复
0
回复 luoyangyouzi
:
同样无法观看
2020-06-28 17:46:27 回复
0
很好课程!!!
2020-06-28 17:46:27 回复
0
第1章 序言
6. 8:40
7. 7:08
第6章 1
使用课程券需先认证
为保证平台的学术氛围,请先完成认证,认证可享受以下权益
基础课程券2张
200积分
确认
取消
下载附件需认证
为保证平台的学术氛围,请先完成认证,认证可享受以下权益
基础课程券2张
200积分
确认
取消
APP下载 领课程券
扫码下载APP
领基础课程券
公众号
论文辅导
扫码添加小咖微信,为你定制一对一论文辅导方案!
AI小咖
会员服务
DRPP
积分商城
意见反馈