数据分析:资源共享课
主持人:王斌会 教授
Toggle navigation
数据分析:资源共享课
1. 数据分析简介@
2. Excel数据分析:
___ 数据统计分析
___ 经管数据分析
3. R语言数据分析:
___ 基本数据分析
___ 多元统计分析
___ 时序数据分析
___ 统计模拟实验
4.Python数据分析:
___ 数据分析基础
___ 数据挖掘应用
5. 数据分析应用#
___ 数据库及应用
___ 案例分析应用
关于我们
3.2-1 多元统计分析
red
2016-02-29 16:18:13
4443
2
1
rstat
red
 ###**“十二五”国家规划教材:高等教育出版社 2020.2 [图书详情](http://xuanshu.hep.com.cn/front/h5Mobile/bookDetails?bookId=5bed6b08f18f967ee7f37a12)** --- ### **(第五版)配套资料: >**例子数据:[mvstats5.xlsx](http://leanote.com/api/file/getAttach?fileId=5c1c7281ab644160950001ff)** >**例子代码:[mvstats5.R](http://leanote.com/api/file/getAttach?fileId=5c1c7281ab644160950001fd)** >**案例数据:[mvcase5.xlsx](http://leanote.com/api/file/getAttach?fileId=5c1c7286ab64415e970001b6)** >**案例代码:[mvcase5.R](http://leanote.com/api/file/getAttach?fileId=5c1c7281ab644160950001fe)** >**习题数据:[mvexer5.xlsx](http://leanote.com/api/file/getAttach?fileId=5c1c7281ab64416095000200)** >**自定义包:[msaR.R](http://leanote.com/api/file/getAttach?fileId=5c1c7281ab64415e970001b5)** **第五版可直接调用自定义函数 source("msaR.R")** 现不用加载自定义包 library(mvstats),这样可不受R语言版本限制,并可查看源代码! **PPT等详细资料见https://gitee.com/Py-R/mvstats5** ### **(第五版)对应在线课程:** >**(1)中国大学MOOC: https://www.icourse163.org/search.htm?search=%E7%8E%8B%E6%96%8C%E4%BC%9A#** 2020秋季开课时间:2020年09月22日~2020年11月29日 学时安排: 3-5小时每周 > **(2) 学堂在线: https://next.xuetangx.com/course/JNU07011000851/1515699** --- ### **电子表格数据的读取** 调入数据是R语言分析的第一步,在第五版中采用直接读取电子表格中数据表的方式,可一次读取多个数据表,常用openxlsx包,下面以mvstats5.xlsx的d3.1数据读取为例。 [数据格式见](https://leanote.com/api/file/getImage?fileId=5c121311ab64410715002492) [详细操作见](https://gitee.com/Py-R/mvstats5/blob/master/Jupyter.ipynb) ### 读取方式一:使用openxlsx包, 并将第1列设为数据框行名, rowNames=TRUE >library(openxlsx) #加载包openxlsx,需先安装:install.packages('openxlsx') > d3.1=read.xlsx('mvstats5.xlsx','d3.1',rowNames=TRUE);d3.1 ### 读取方式二:使用readxl包, 并用函数msa.X将第1列设为数据框行名 > library(readxl) #加载包readxl, 需先安装包, install.packages('readxl') > d3.1=read_excel('mvstats5.xlsx','d3.1'); d3.1 > source('msaR.R') #调用第五版自定义函数! > d3.1=msa.X(d3.1) #将第1列设为数据框行名 ---- msa.X函数的源代码定义如下: msa.X<-function(df){ X=df[,-1]; #去除第1列以外的所有数据 rownames(X)=df[,1]; #将数据框第1列设置为行名 X } --- ## **使用第四版的读者请看下面内容** ### **详细内容见: https://gitee.com/Py-R/mvstats4**  ## 第四版资料下载 >**例子数据:[mvstats4.xlsx](http://leanote.com/api/file/getAttach?fileId=5c191256ab64417064000dec)** >**例子代码:[mvstats4.R](http://leanote.com/api/file/getAttach?fileId=5c19126dab6441725b000d89)** >**案例数据:[mvcase4.xlsx](http://leanote.com/api/file/getAttach?fileId=5c191256ab64417064000deb)** >**案例代码:[mvcase4.R](http://leanote.com/api/file/getAttach?fileId=5c191272ab64417064000ded)** >**习题数据:[mvexec4.xlsx](http://leanote.com/api/file/getAttach?fileId=5c191256ab6441725b000d86)** >**自定义包:[mvstats.zip](http://leanote.com/api/file/getAttach?fileId=5c191261ab6441725b000d88)** 下载到本地并在R中安装并加载 library(mvstats) >**自定义函数:[mvstats.R](http://leanote.com/api/file/getAttach?fileId=5c1912dcab64417064000dee)** 下载到本地目录在R中直接调用 source("mvstats.R") --- ### **第四版PPT:[多元统计分析(4).zip](http://leanote.com/api/file/getAttach?fileId=5d707f79ab64412b86001859)** 注:幻灯中采用新的读取数据方式,见第五版自定义函数 ---
上一篇:
3.2 Rstudio
下一篇:
3.2-2 多元在线课程
2
赞
4443 人读过
新浪微博
微信
腾讯微博
QQ空间
人人网
提交评论
立即登录
, 发表评论.
没有帐号?
立即注册
1
条评论
More...
文档导航
没有帐号? 立即注册