On Apr 16, 2009, at 10:41 AM, Andy Barenberg wrote:
hello, I am trying to merge a large number of datasets into one using
"merge.rec".
merge.rec(db, by.x = "X", by.y = "Y")
where "db" is my list of datasets. My problem is trying to create a
code to
create the list "db" for all the files without missing data:
Currently my
code looks like:
if(any(is.na(X))){print(paste("there is an NA in dbn",i, sep=""))}
else {
db<-append(db,paste("dbn",i, sep="")) }
this creates the list of names, but it creates the list of names in
the form
of
c("dbn5", "dbn6",....)
where to make the merge.rec function work I need it to be of the form
dbn5,dbn6,....
without the quotation marks.
any easier way of doing this?
Use the function list()
dblist <- list(dblist, i)
Then use lapply with dblist as an argument.
--
David Winsemius, MD
Heritage Laboratories
West Hartford, CT
______________________________________________
R-help@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.