[R] pulling out 1 country and 1 wave

Nicole Marie Ford nmford at uwm.edu
Wed Mar 7 06:29:32 CET 2012


I have done the following to pull out the wave but now need to pull out the country form there...  but I am not sure how to do that without messing it up?

wvs.a[,362]
table(wvs.a[,362])
norway <- wvs.a[which(wvs.a[,362] == "2005"), ]
dim(norway) 

----- Original Message -----
From: "Nicole Marie Ford" <nmford at uwm.edu>
To: "r-help" <r-help at r-project.org>
Sent: Tuesday, March 6, 2012 11:08:43 PM
Subject: [R] pulling out 1 country and 1 wave

Hello.

I am trying to pull out one country from a time series of 5 waves.  For example I need Norway from the 5th wave.  This is new to me.  Typically, I work with country specific surveys.


data = norway

I have attached a .tiff of the codebook showing the variable names for Norway and the wave.  They appear to be Norway = v218 and wave = v15.  But perhaps I am wrong and this is part of the problem. 

Below are examples of things I have tried.

For the record, no this is not at all HW, this is for my own research.

Thanks in advance.  

~Nicole.

wvs.a[,v218]
table(wvs.a[,v218])
norway <- wvs.a[which(wvs.a[,v218] == "norway"), ]
dim(norway)

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list