[R] Question about user define function

GL pflugg at shands.ufl.edu
Tue Jun 15 22:39:23 CEST 2010


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=".")
  c(this= dbs.this,patdb = dbs.that)
  
}

Called by: 

c <- ReadInputDataFrames()

Results:

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


-- 
View this message in context: http://r.789695.n4.nabble.com/Question-about-user-define-function-tp2256513p2256513.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list