首先,
我无法使用write_csv()函数。我得到以下错误
function_listk中的错误:找不到函数"write_csv“
我已经安装了readr pacakge,它提供了以下警告:
get中的错误(Infoi,1,env= env):无法打开文件'C:/Users/kishore/Documents/R/win-library/3.3/rlang/R/rlang.rdb':--没有这样的文件或目录--此外:警告消息:包‘readr’是在RVersion3.3.3错误下生成的:包或名称空间加载“readr”失败
第二,
当我试图读取.csv或excel文件时,会出现以下错误
c <- read_excel("C:/Users/kishore/Desktop/c.xlsx")get中的错误(Infoi,1,env= env):无法打开文件'C:/Users/kishore/Documents/R/win-library/3.3/rlang/R/rlang.rdb':没有这样的文件或目录
View(c)视图中的错误:找不到对象'c‘
我不知道是什么问题,请告诉我
发布于 2018-11-08 02:26:59
我知道这个问题已经解决了。我只想告诉你另一个解决方案。
如果readr包有问题,请尝试使用基本函数,如read.csv和utils包中的write.csv。你不必安装任何新的软件包。
示例
#Reading a csv
#row.names tells that the 1st row contains the headers
df <- read.csv('/Users/Desktop/sample.csv', row.names=1)
#Writing into a csv
#row.names tells that the 1st row contains the column names
write.csv(df, '/Users/Desktop/sample_copy.csv', row.names=T)https://stackoverflow.com/questions/44285735
复制相似问题