【发布时间】:2019-12-30 16:43:32
【问题描述】:
我有以下代码,用于从名为 RawData 的目录中获取 4 个 csv 文件,并使用 rbind 组合行,效果很好
library(data.table)
setwd("C:/Users/Gunathilakel/Desktop/Vera Wrap up Analysis/Vera_Wrapup_Analysis/RawData")
myMergedData <-
do.call(rbind,
lapply(list.files(path = getwd()), fread))
但是,我想确保此代码在另一台计算机上可重现,并决定摆脱 setwd。所以我决定使用here 包并实现相同的过程
library(here)
myMergedData <-
do.call(rbind,
lapply(list.files(path = here("RawData")), fread))
当我运行上面的脚本时,它会给出以下消息
Taking input= as a system command ('Issued and Referral Charge-2019untildec25th.csv') and a variable has been used in the expression passed to `input=`. Please use fread(cmd=...). There is a security concern if you are creating an app, and the app could have a malicious user, and the app is not running in a secure environment; e.g. the app is running as root. Please read item 5 in the NEWS file for v1.11.6 for more information and for the option to suppress this message.
'Issued' is not recognized as an internal or external command,
operable program or batch file.
【问题讨论】:
标签: r fread reproducible-research