Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/62.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Windows中,R似乎调用了错误的格式函数_R_Windows_Format - Fatal编程技术网

在Windows中,R似乎调用了错误的格式函数

在Windows中,R似乎调用了错误的格式函数,r,windows,format,R,Windows,Format,我尝试在Windows(R版本3.2.0)和Mac(R版本3.1.3)上运行相同的R脚本。它在Mac上工作,但当我尝试使用此命令时 startYear <- format(min(dates), "%Y") 它似乎调用了错误的格式函数 有没有办法告诉它这是我想要的日期格式函数?我已经试过了 Date.format() 但它只是说,Date.format()不存在 有人能帮忙吗 谢谢 PS:我不能停止使用Windows,所以我必须让它在那里工作。当您收到错误消息时,请在您的问题中提供se

我尝试在Windows(R版本3.2.0)和Mac(R版本3.1.3)上运行相同的R脚本。它在Mac上工作,但当我尝试使用此命令时

startYear <- format(min(dates), "%Y")
它似乎调用了错误的格式函数

有没有办法告诉它这是我想要的日期格式函数?我已经试过了

Date.format()
但它只是说,
Date.format()
不存在

有人能帮忙吗

谢谢


PS:我不能停止使用Windows,所以我必须让它在那里工作。

当您收到错误消息时,请在您的问题中提供
sessionInfo()
的输出。一个简单的解决方法是
base::format(min(dates),“%Y”)
。您是想尝试
format.Date
而不是
Date.format
?您的问题不是由使用windows引起的。必须有其他内容(例如,您定义了一个
format
函数,它屏蔽了
base::format
)。用一个普通的R会话来尝试它。
Date.format()