An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090416/51e25c64/attachment-0001.pl>
Creating a list of database names for merge.rec
2 messages · Andy Barenberg, David Winsemius
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