search for: set7

Displaying 1 result from an estimated 1 matches for "set7".

Did you mean: set
2012 Dec 10
3
use variable in for loop to name output files
Hi, This question should be simple to answer. I am a new R user. I have a data.frame called appended. I would like to break it into 7 smaller datasets based on the value of a categorical variable dp (which has values 1:7). I would like to name the smaller datasets set1, set2, set3,....,set7. I don't know how to refer to the variable in the for loop, when naming the output datasets. In STATA (which I am much more familiar with) each i in the foreach loop would be refered to as `i'. This is the code I've included below. I've also tried set[[i]] and set[i] neither works....