by 写长城的诗 • October 30, 2011 • Comments Off This post was kindly contributed by 数据科学与R语言 - go there to comment and to read the full post. 一.数据导入 对初学者来讲,面对一片空白的命令行窗口,第一道真正的难关也许就是数据的导入.数据导入有很多途径,例如从网页抓取.公共数据源获得.文本文件导入.为了快速入门,建议初学者采取R语言协同Excel电子表格的方法.也就…
#因子:分类数据#有序和无序#整数向量+标签label#Male/Female#常用于lm(),glm() > x <- factor(c("female","female","female","male"))> y <- factor(c("female","female","female","male"),levels=…
转载请说明. R语言官网:http://www.r-project.org/ R语言软件下载:http://ftp.ctex.org/mirrors/CRAN/ 注:下载时点击 install R for the first time 下面进行一个简单的入门程序学习. 先新建一个txt,叫做 Rice_insect.txt 点我下载,内容为:(用制表符Tab) Year Adult Day Precipitation 1973 27285 15 387.3 1974 239 14…