[R] dataframes from a function

2011-02-04 Thread chris20
Hi, I'm trying to create a function to return three dataframes for later use in a graphic so I want the return from the function to give me dataframes and with unique names relating to the variable they are based on. For example. sub-c(6-1a,6-1a,6-1a,9-2b,9-2b,9-2b,7c,7c,7c)

Re: [R] dataframes from a function

2011-02-04 Thread Phil Spector
Chris - You can solve your problem by removing the print statements and replacing them with answer = list(org.plot[org.plot$sub %in% ex.plot,], new.pl[new.pl$yar %in% 1991,], new.pl[new.pl$yar %in% 1993,]) prefix = sub('-','.',ex.plot) names(answer) =