s-news
[Top] [All Lists]

Re: setwd() analogue

To: "Iyue Sung" <isung@affinnova.com>
Subject: Re: setwd() analogue
From: Hui-May_Chu@vrtx.com
Date: Thu, 23 Sep 2004 15:54:43 -0400
Cc: s-news@lists.biostat.wustl.edu, s-news-owner@lists.biostat.wustl.edu
In-reply-to: <90821ABF429A074DA88E56D1DF7A71610130CB58@afifs1.affinnova.com>
Iyue,

One alternative is to define a directory (myDir), then import data 
(myFile) from there.  The below is an example of importing a Excel data 
set call "myData" in the "C:\\My Documents\\" directory.

############################
myDir_"C:\\My Documents\\"


myFile_"myData"
myTarget_paste(myDir,myFile,".xls",sep="")

guiImportData(FileName = myTarget,
    FileTypes = "Excel Worksheet (xl?)", TargetDataFrame = myFile)
##################################################################

Have fun.



Hui-May 



********************************
Hui-May Chu, MBA, PhD
Dept. of Clinical Pharmacology
Vertex Pharmaceuticals Inc.
(617) 444-6398 (o)
(617) 444-6713 (fax)
*********************************




"Iyue Sung" <isung@affinnova.com> 
Sent by: s-news-owner@lists.biostat.wustl.edu
09/23/2004 03:17 PM

To
<s-news@lists.biostat.wustl.edu>
cc

Subject
[S] setwd() analogue






Hi all, 

  I'm trying to specify the working directory from which to read in (and
write to) miscellaneous data. 
The documents and archives seem to suggest something like

> data.wd<-"C:\\Projects\\Data1"
> attach(pos=1, new.database(data.wd)) 

But then, I try to read in a simple file with:

> base<-read.table("myData.csv", sep=",", header=T)

without success.

Could someone provide a tip please?
Basically, I would like to use syntax that is analogous to "setwd()" in
[R].


Thanks,
Iyue



--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news



<Prev in Thread] Current Thread [Next in Thread>