简体   繁体   中英

Log of install.packages()

Does R by default store a log of the installation messages anywhere? If not, is there a way to have it log them on a file?

Sometimes I let R install various pacakges automatically, eg

install.packages("caret", dependencies=c("Depends", "Suggests"))

which can take hours and the installation log does not fit on the scroll buffer, so I can't see how the installation proceeded. It would be great if I can have R save this log somewhere (in addition to showing it on the terminal)

If you only need to know how the installation went (warnings and errors), the following may be sufficient for your needs:

sink("sink.txt")
install.packages("caret", dependencies=c("Depends", "Suggests"))
sink()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM