[R] some related problems
Jens Oehlschlägel-Akiyoshi
jens.oehlschlaegel-akiyoshi at mdfactory.de
Fri Nov 12 15:52:03 CET 1999
I just tried to batch-start rgui.exe (not rterm.exe) in a way, that it
read.table()s data from a file with changing filename. As I understand no
command line parameters are available for that, so instead I tried to pass
the filename to an approbriate .RProfile, which works roughly, BUT
## this is my %R_USER%\.RProfile
im <- read.table("d:/temp/im/temp.csv", header=TRUE, sep=",")
nam <- names(im)
nnam <- nchar(nam)
newnam <- substr(nam, 2, nnam-1) # change names from e.g. <"x"> to <x>
names(im) <- newnam
pairs2(im)
## end
Two lines in this code do not work *during* .RProfile execution, but they
work if entered manually *after* all profile executions:
names(im) <- newnam # should work always
Error: attempt to set an attribute on NULL
pairs2(im) # my global RProfile sources a file which defines pairs2()
Error: couldn't find function "pairs2"
How can I make these commands working during .RProfile execution?
Moreover: how can I exchange single Backslashes to slashes in R?
I tried:
> gsub("[\\]", "/", "c:\temp")
[1] "c: emp"
> gsub("[\\]", "/", "c:\\temp")
[1] "c:/temp"
Thanks for any help
--
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