Autoload options in native package

this is probably, bad style

but can I change the package download options? For example. my package should set the following parameters

options(java.parameters = "-Xmx8000m")
options(dplyr.width = Inf)
lattice.options(default.args = list(as.table = TRUE))
lattice.options(skip.boundary.labels = 0)

      

+3


source to share


1 answer


Yes, of course you can use a function .onAttach()

to do this. Then you might want to make sure you document this, and possibly restore it when the package is unloaded.



Isn't it so clear. Alternatively (which may be more common), you can also set your personal preferences on ~/.Rprofile

or on the site Rprofile.site

. I often do this for myself and colleagues for things like setting up a remote server.

+5


source







All Articles