[R] Where the data file is stored?

Stephen Liu satimis at yahoo.com
Thu Aug 12 17:39:12 CEST 2010


> You're not seeing the .Rdata file containing the data objects. Try:

> list.files(getwd(),full.name=TRUE, all.files=TRUE)


Hi Keith,

Thanks for your advice

On R console running
> list.files(getwd(),full.name=TRUE,all.files=TRUE)



The output is similar to running following command on Ubuntu terminal;

> ls -al /home/userA/


Except the latter showing which are files and which are directories


B.R.
satimis




----- Original Message ----
From: Keith Jewell <k.jewell at campden.co.uk>
To: r-help at stat.math.ethz.ch
Sent: Thu, August 12, 2010 8:47:03 PM
Subject: Re: [R] Where the data file is stored?

You're not seeing the .Rdata file containing the data objects. Try:

list.files(getwd(),full.name=TRUE, all.files=TRUE)


"Stephen Liu" <satimis at yahoo.com> wrote in message 
news:961426.85478.qm at web113203.mail.gq1.yahoo.com...
----- Original Message ----

From: Alain Guillet <alain.guillet at uclouvain.be>
To: Stephen Liu <satimis at yahoo.com>
Cc: r-help at r-project.org
Sent: Thu, August 12, 2010 5:28:32 PM
Subject: Re: [R] Where the data file is stored?

> You can find your current working directory with the getwd() function.


Hi Alain,


Thanks for your advice.


> getwd()
[1] "/home/userA"


> list.files(getwd())
[1] "Desktop"           "Documents"         "Downloads"
[4] "examples.desktop"  "last-packages.txt" "Music"
[7] "myR"               "petdrug.csv"       "Pictures"
[10] "Public"            "R"                 "Templates"
[13] "Videos"


> list.files(getwd(),full.name=TRUE)
[1] "/home/userA/Desktop"
[2] "/home/userA/Documents"
[3] "/home/userA/Downloads"
[4] "/home/userA/examples.desktop"
[5] "/home/userA/last-packages.txt"
[6] "/home/userA/Music"
[7] "/home/userA/myR"
[8] "/home/userA/petdrug.csv"
[9] "/home/userA/Pictures"
[10] "/home/userA/Public"
[11] "/home/userA/R"
[12] "/home/userA/Templates"
[13] "/home/userA/Videos"


How to show on the printout which is directory?  TIA

B.R.
Stephen L


On 12-Aug-10 11:22, Stephen Liu wrote:
> ----- Original Message ----
>
> From: Philipp Pagel<p.pagel at wzw.tum.de>
> To: r-help at r-project.org
> Sent: Thu, August 12, 2010 3:54:53 PM
> Subject: Re: [R] Where the data file is stored?
>
>> You dont't tell us what you did to "create a datafile" - to me it
>> sounds like you created an object (probably a data frame) in your R
>> workspace. If that's  the case it is stored in a file called .RData in
>> your current work directory (together with other variables in your
>> workspace). If that is not what you did please give us mre
>> information.
>
> Hi Philipp,
>
> Yes, it is "data frame".
>
> I have run the step
> write.csv .......
>
> Other advice noted.  Thanks
>
>
> B.R.
> Stephen L
>
>
>
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Alain Guillet
Statistician and Computer Scientist

SMCS - IMMAQ - Université catholique de Louvain
Bureau c.316
Voie du Roman Pays, 20
B-1348 Louvain-la-Neuve
Belgium

tel: +32 10 47 30 50

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.






More information about the R-help mailing list