目前读execl使用两个包
install.packages("readxl")
library("readxl", lib.loc="C:/Program Files/R/R-3.3.2/library")
x <- read_excel("C:/Users/Administrator/Desktop/work/njupt_plays.xls")
install.packages("openxlsx")
library("openxlsx", lib.loc="C:/Program Files/R/R-3.3.2/library")
Claimdata <- read.xlsx("C:/Users/Administrator/Desktop/work/njupt_plays.xls", sheet = 1)
第二个包只能用xlsx,推荐第一个包。
读json使用
install.packages("rjson")
library("rjson")
result <- fromJSON(file= "C:/Users/Administrator/Desktop/day.json")
json_data_frame <- as.data.frame(result)
网友评论