search for: builddl

Displaying 2 results from an estimated 2 matches for "builddl".

Did you mean: buildd
2004 Mar 25
2
if block and brackets
...ne at the end of statement1 yields a syntactically complete statement that is evaluated." well, what is wrong with this if structure? I am getting an error on the line where "else" is thanks if (exists("f")){ dt <- read.csv(file.path(d,f),header=F)#data frame builddl(dt,f) else for (i in dir(d)){ dt <- read.csv(file.path("c:/data",i),header=F)#data frame an <- sub("([^.]+)(\\..+)","\\1", i)) builddl(dt,an) } }
2004 Mar 27
1
building a list in loop
Hello getdata <- function(p){ fname <- NULL; dl <- list()#build the sturcture builddl <- function(q,s){ fname <<- c(fname,s) #where "s" is a string dl <<- list( dl, dt2) } list(names = fname, data = dl) } data <- getdata("c:\somepath") > data $names [1] "fname" $data $data[[1]] <--- since there is no [[1]] how can I st...