0

我正在尝试使用日期自动更新接收器文件的名称,但没有任何运气。以下是我所拥有的,有什么建议吗?

time.stamp <- format(Sys.time(), "%m/%d/%Y")
nameFile <- paste(time.stamp, ".txt", sep = "")
sink(nameFile)
4

1 回答 1

2

the slash '/' character is invalid for naming files. Try with some other character

time.stamp <- format(Sys.time(), "%m.%d.%Y")

for example will allow your code to execute.

于 2015-07-06T17:21:13.317 回答