سؤال

I'm doing a lot of development in R at the moment, so I would like to enable dev_mode when R starts up.

I've tried adding dev_mode() to my .Rprofile, given here:

library("devtools")
library("testthat")

dev_mode()

But doing so gives the following error:

Error in is_library(path) : could not find function "file_test"

and dev_mode isn't loaded on startup. Would anyone know how to fix this?

R 2.15.1-2, devtools 1.0, testthat 0.7

هل كانت مفيدة؟

المحلول

file_test comes from the utils package, so maybe that's not getting loaded. Try:

library(utils)

before anything else in your .Rprofile.

As commented, this works for me without it... YMMV...

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top