On 1/10/10 5:46 AM, anupam sinha wrote:
Hi Uwe,
Thanks for your suggestion . Here's my code. I am confused as
to how to initialize an empty list . Here I have used pairlist()
*list.files()->org_xml_dirs
## the following is much preferred:
org_xml_dirs <- list.files()
for
To initialize an list:
foo <- list()
## and then extend it as in your code
foo <- c(foo, list(x=1))
foo
$x
[1] 1
foo <- c(foo, list(y=1))
foo
$x
[1] 1
$y
[1] 1
At 7:16 PM +0530 1/10/10, anupam sinha wrote:
Hi Uwe,
Thanks for your suggestion . Here's my code. I am conf
Hi Uwe,
Thanks for your suggestion . Here's my code. I am confused as
to how to initialize an empty list . Here I have used pairlist()
*list.files()->org_xml_dirs
for (i in org_xml_dirs)
{
setwd(file.path("/home/anupam/Research/Anupam_data/ORG_XML_FILES/",i))
org_xml<-list.files(
On 09.01.2010 19:04, anupam sinha wrote:
Hi Jim,
Thanks for your suggestion. I tried scripting but gives me an
error. Can you tell me what am I doing wrong here ?
*> list.files()->org_xml_dirs
Please do turn that arrow around
for (i in org_xml_dirs){
+ setwd("/home/anup
Hi Jim,
Thanks for your suggestion. I tried scripting but gives me an
error. Can you tell me what am I doing wrong here ?
*> list.files()->org_xml_dirs
> for (i in org_xml_dirs){
+ setwd("/home/anupam/Research/Anupam_data/ORG_XML_FILES/i")}
Error in setwd("/home/anupam/Research/Anu
?list.files
?file.info
?setwd
You can get a list of all the files in a directory (list.files) and then do
a file.info to determine which ones are the directories you want to search.
A list.files on that directory will give you the list of file names that you
can then process.
On Fri, Jan 8, 20
Dear all,
I have this directory structure :
Dir1 Dir2 Dir3 Dir4 .
A.xml D.xmlG.xml
B.xml E.xml H.xml
C.xml F.xml I.xml
Within each of these directories (Dir1, Dir2 etc) there are a num of xml
files (A.xml, B.xml etc).
7 matches
Mail list logo