1
我想运行需要使用文件时间戳的R脚本。访问R中的文件日期
使用Windows资源管理器,我意识到有3种'文件日期类型'(“日期”,“创建日期”和“修改日期”)。见下文。
当使用一个R函数file.info()
你可以阅读“创建日期”和“修改日期”,而不是“日期”栏(如在Windows资源管理器apperead)此日期栏是一个我需要的。
photo.directory <- file.info(getwd())
head(photo.directory)
size isdir mode mtime ctime
IMG_0381.jpg 15904788 FALSE 666 2017-05-02 13:55:14 2017-05-25 15:39:36
IMG_0382.jpg 8895692 FALSE 666 2017-05-02 13:55:17 2017-05-25 15:39:36
IMG_0383.jpg 8731599 FALSE 666 2017-05-02 13:55:21 2017-05-25 15:39:37
IMG_0384.jpg 15189133 FALSE 666 2017-05-02 13:55:25 2017-05-25 15:39:37
IMG_0385.jpg 10545637 FALSE 666 2017-05-02 13:55:29 2017-05-25 15:39:38
IMG_0386.jpg 10565079 FALSE 666 2017-05-02 13:55:31 2017-05-25 15:39:38
atime exe
IMG_0381.jpg 2017-05-25 15:39:36 no
IMG_0382.jpg 2017-05-25 15:39:36 no
IMG_0383.jpg 2017-05-25 15:39:37 no
IMG_0384.jpg 2017-05-25 15:39:37 no
IMG_0385.jpg 2017-05-25 15:39:38 no
IMG_0386.jpg 2017-05-25 15:39:38 no
任何想法如何克服这在R?
检查此评论: https://superuser.com/questions/147525/what-is-the-date-column-in-windows-7-explorer-it-matches-no-date-column-from – Jimbou
似乎有两个软件包可以访问EXIF信息:'exif'和'exifr'。你可以试试。 –
我不是你的使用案例,但你可能对搞清楚为什么修改日期大于创建日期感兴趣 –