[R] please help me on this problem

Uwe Ligges ligges at statistik.uni-dortmund.de
Sun Oct 5 12:43:42 CEST 2003


Yong Wang wrote:
> 
> Dear all:
> I am totally new to R, actually, statistics software.I get two very
> simple, even stupid question:

But you are not new to e-mails. So, please don't specify a stupid
subject line, but a sensible one. (OK, the rest of this message's body
is unspecific as well, hence the subject might be quite sensible in a
way, tough.)


> 1) where I should put the data file in order to use it , I tried to build
> a work dir in library( package:base) and save the text file (data) there,
> then, I use read.table(filename), not work; I tried the full path, still
> not work. I must have done something wrong.

The working directory is the one you are starting R in, or what you have
set with setwd(). It's not a good idea to create a working directory
within the library section. Specifying the full path should always work.

What you did wrong is:
- not reading the manual "An Introduction to R" carefully
- not reading the manual "R Data Import/Export"
- beeing to unspecific. After having read the manuals and help pages,
you may ask a specific question, but including error messages and code
you used (we cannot help if we cannot look at your mistakes).


> 2) is it possible to create a data file in R instead of put data in a txt
> file and then save the file under R?

Yes. Exporting Data (including ASCII formats) is also covered in the "R
Data Import/Export" manual.

Uwe Ligges

> I tried to find answer from the introduction, failed.
> I really appreciate your help, thank you very much.
> best
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help




More information about the R-help mailing list