SUMMARY: [R] some related problems

Jens Oehlschlägel-Akiyoshi jens.oehlschlaegel-akiyoshi at mdfactory.de
Fri Nov 12 18:08:35 CET 1999



Thanks to Brian Ripley and Peter Dalgaard for the quick and excellent
replies!

I had problems with properly executing R commands in .Rprofile
Prof. Ripley teached me to put my commands into .First() for later
execution. So the following works like a charm:

# Content of %R_USER%\.Rprofile
.First <- function(){
  filename <- scan("d:/temp/im/filename.txt", what=character(0))
  im <- read.table(filename, header=TRUE, sep=",")
  nam <- names(im)
  nnam <- nchar(nam)
  names(im) <- substr(nam, 2, nnam-1)
  pairs2(im)
  im <<- im
}


As Peter Dalgaard pointed out: "c:\temp" means: "c"  ":"  "\t"  "e"  "m"
"p"
thus either my outer process either needs to produce proper R-syntax
"c:\\temp"
or - as above - I have to scan in the filename.

Finally, using this unique opportunity to correct something Prof. Ripley
wrote:

> BTW, it is .Rprofile, not .RProfile, but NT can't tell the difference.

Oh yes, NT can! At least in the explorer: if I try to change the filename
from .RProfile to .Rprofile, NT refuses with the following error-message:
'Please enter a filename' (this renaming only works in a command window).
I really need to get a machine with a decent operating system.

Thank you again


--
Dr. Jens Oehlschlägel-Akiyoshi
MD FACTORY GmbH
Bayerstrasse 21

80335 München

Tel.: 089 545 28-27
Fax.: 089 545 28-10
http://www.mdfactory.de

Standard Disclaimers: Opinions expressed here are personal
and are not otherwise represented.  Any use of tradenames
in the above does not constitute a MD FACTORY endorsement.

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list