How to load packages in R automatically?

Put library(foo) in your .Rprofile file or set R_DEFAULT_PACKAGES: see ?Rprofile … In particular (because ?Rprofile is long and potentially intimidating): If you want a different set of packages than the default ones when you start, insert a call to ‘options’ in the ‘.Rprofile’ or ‘Rprofile.site’ file. For example, ‘options(defaultPackages = character())’ will attach no … Read more

Force R not to use exponential notation (e.g. e+10)?

This is a bit of a grey area. You need to recall that R will always invoke a print method, and these print methods listen to some options. Including ‘scipen’ — a penalty for scientific display. From help(options): ‘scipen’: integer. A penalty to be applied when deciding to print numeric values in fixed or exponential … Read more