[R] How do you organize the objects you produced?
Rikkoe@softhome.net
rikkoe at softhome.net
Mon Mar 25 21:26:38 CET 2002
Hello!
It would be nice to hear how you organize the R-objects you produced. I
found almost nothing about that neither in the R-manuals nor in two books
about S.
For example I am trying to find out, how to load the functions that I have
written and that are now saved in a .txt-file in a Windows directory. Is
copying and pasting it to the RGui console really the only feasible way to
do that? Constructing packages, similar to the ones included in the basic R
system, is probably too complicated for a beginner like me, isn´t it?
I wonder why manuals and books just explain how to write functions, but not
how to keep and to reload them. I have got a similar problem with my data. I
understood (mistakenly?) that one can attach a Windows directory to the
search path, so that every file inside this directory is known by R, without
further need to specify the path. So I tried:
> attach("C:\\Temp",2)
Error in load(file, envir) : unable to open file
> search()
[1] ".GlobalEnv" "file:C:\\Temp" "package:ctest" "Autoloads"
[5] "package:base"
Temp is a directory and includes a file named test.dat. I went on:
> file <- read.table("test.dat", header = TRUE, fill = TRUE)
Error in file(file, "r") : cannot open file `test.dat'
This last command only works when I use the RGui-menu to change my working
directory to Temp.
I feel I am using R as if cutting hair with a spoon. Do you know a nicer way
to use it?
Michael
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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