[R] echo Rprofile.site on startup

Thompson, David (MNR) David.John.Thompson at ontario.ca
Tue Jun 17 22:32:54 CEST 2008


Hello,

I have not been able to find how to have R echo the Rprofile.site
contents to the console on start-up.
Changing the windoze shortcut to include the '--verbose' option does not
show what I am looking for.
I would like to see the options and commands listed, in addition to the
library() loadings, as they are processed. Examples of the type of
options I like and shortcut-commands (aliases) that I collect to shrink
my keystroke count are:

	options(digits=2)
	options(graphics.record=TRUE)

	# show head and tail together
	so <- function(x, n=20) { print(head(x, n)) ; print(tail(x, n))
}
	# shorthand for part of Sys.info() and sessionInfo()
	si <- function() { Sys.info()[c(1,2,3,5)] ; sessionInfo() }

I would like to view these as processed when I am changing options and
adding aliases so that I may know which parts are successfully/properly
defined.

Does the same process work for all of Rprofile.site, .Rprofile, .First,
.Last (, etc.?) profile files?

Is there a 'best practice' on which of the profile files one should use?
I use only the Rprofile.site since I am the only user on my PC.

Thanx, DaveT.
*************************************
Silviculture Data Analyst
Ontario Forest Research Institute
Ontario Ministry of Natural Resources
david.john.thompson at ontario.ca
http://ontario.ca/ofri
*************************************
Sys.info()
                     sysname                      release
version                      machine 
                   "Windows"                         "XP" "build 2600,
Service Pack 2"                        "x86" 

sessionInfo()
R version 2.7.0 (2008-04-22) 
i386-pc-mingw32 

locale:
LC_COLLATE=English_Canada.1252;LC_CTYPE=English_Canada.1252;LC_MONETARY=
English_Canada.1252;LC_NUMERIC=C;LC_TIME=English_Canada.1252

attached base packages:
 [1] datasets  grDevices splines   grid      graphics  stats     tcltk
utils     methods   base     

other attached packages:
 [1] ggplot2_0.6        colorspace_0.95    RColorBrewer_1.0-2
MASS_7.2-42        proto_0.3-8        reshape_0.8.0      car_1.2-8
svSocket_0.9-5    
 [9] svIO_0.9-5         R2HTML_1.59        svMisc_0.9-5
svIDE_0.9-5       

loaded via a namespace (and not attached):
[1] tools_2.7.0



More information about the R-help mailing list