[R] Subset Question

Chertudi chertudi at uw.edu
Thu Feb 25 07:37:44 CET 2010


Hello helpful R folks,

   First off, please forgive my English.  Second, I'm new with R, I've
searched the archives about subsets, and I haven't found quite the help I
need.

I'm currently analysing a population survey whose data set has about 15000
households (the rows/observations) and 130 variables (the columns).  I've
managed to import the set into R as a data.frame called eu08.  Now, I'm
trying to look at all of the variables, but limited to one province in the
"region" variable.  I think the provinces are factors, and the province of
interest is labeled '3'.
I've tried the following:

region3=subset(eu08, region==3)
--this simply strips all of the rows from the columns, and I know that about
4000 of the observations are specific to region 3.  So does putting the 3 as
'3' and "3".

 Any help would be greatly appreciate.

-- 
View this message in context: http://n4.nabble.com/Subset-Question-tp1568555p1568555.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list