[R] assigning global columns selection for all subset functions in script

bcrombie bcrombie at utk.edu
Tue Jun 11 18:18:25 CEST 2013


How do I let R know that I always want to select the same columns in my
subset functions (below), so that I don't have to keep copy/pasting the same
selection? (thanks)
	devUni2 <- subset(devUni1, dind02 != 52,
select=c(paidhre,earnhre,earnwke,uhourse,hourslw,otc,ind02,dind02,occ00,docc00,lfsr94,class94,relref95,smsastat,state,weight,year))
	devUni3 <- subset(devUni2, lfsr94 == 1 | lfsr94 == 2 ,
select=c(paidhre,earnhre,earnwke,uhourse,hourslw,otc,ind02,dind02,occ00,docc00,lfsr94,class94,relref95,smsastat,state,weight,year))
	devUni4 <- subset(devUni3, class94 < 6 ,
select=c(paidhre,earnhre,earnwke,uhourse,hourslw,otc,ind02,dind02,occ00,docc00,lfsr94,class94,relref95,smsastat,state,weight,year))
	devUni5 <- subset(devUni4, relref95 < 10 | relref95 ==13 | relref95 >=14,
select=c(paidhre,earnhre,earnwke,uhourse,hourslw,otc,ind02,dind02,occ00,docc00,lfsr94,class94,relref95,smsastat,state,weight,year))



--
View this message in context: http://r.789695.n4.nabble.com/assigning-global-columns-selection-for-all-subset-functions-in-script-tp4669252.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list