摘要: 阅读全文
posted @ 2018-06-06 11:49 陌上少年 阅读(551) 评论(2) 推荐(0) 编辑
摘要: 1.随意选个热点微博 2. 参考 R微博数据分析 http://blog.sina.com.cn/s/blog_9bed162b0102wu1w.html R语言实现代码 devtools::install_github("sjhfx/rwda") library(rwda) access_toke 阅读全文
posted @ 2017-12-05 14:58 陌上少年 阅读(3522) 评论(2) 推荐(1) 编辑
摘要: 1.Web数据 a. 拥有API的网站 > library(WDI)载入需要的程辑包:RJSONIO> library(RJSONIO)> library(WDI)> wdi_datasets <- WDIsearch()> head(wdi_datasets) indicator [1,] "BG 阅读全文
posted @ 2017-12-04 18:35 陌上少年 阅读(804) 评论(0) 推荐(1) 编辑
摘要: R中自带3个日期和时间类:POSIXct、POSIXlt 和 Date。 1. POSIX日期和时间 函数Sys.time将以POSIXct的形式返回当前的日期和时间 > (now_ct <- Sys.time())[1] "2017-12-04 16:55:31 CST"> class(now_c 阅读全文
posted @ 2017-12-04 17:05 陌上少年 阅读(476) 评论(0) 推荐(1) 编辑
摘要: 1. 加载包 > library(lattice) > dotplot(variety ~ yield|site,data=barley,groups=year) Immer's barley 数据集点状图 2. 使用search函数查看所有已加载了的包 > search() [1] ".Globa 阅读全文
posted @ 2017-12-04 16:49 陌上少年 阅读(665) 评论(0) 推荐(1) 编辑
摘要: 字符串和因子 1.字符串 创建字符串 > c("Hello","World")[1] "Hello" "World" paste( ) 函数连接字符串 > c("Hello","World")[1] "Hello" "World"> paste(c("Hello","Hi"),"World")[1] 阅读全文
posted @ 2017-11-16 19:04 陌上少年 阅读(1300) 评论(0) 推荐(1) 编辑