On Jun 15, 2010, at 4:39 PM, GL wrote:


Have the following function that is called by the statement below. Trying to return the two dataframes, but instead get one large list including both
tables.

ReadInputDataFrames <- function() {

dbs.this= read.delim("this.txt", header = TRUE, sep = "\t", quote="\"",
dec=".")
dbs.that= read.delim("that.txt", header = TRUE, sep = "\t", quote="\"",
dec=".")

## Possible that you want to cbind() them rather than c() them

 cbind(this= dbs.this,patdb = dbs.that)

}

Which would require that they have the same number of columns and possibly that the column names match up.

?cbind



Called by:

c <- ReadInputDataFrames()

Results:

str(c) yields a list of 106 items $this.variabe1..53, $that $variable1..53


David Winsemius, MD
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.

Reply via email to