Looks like this way,
dat$lrplacepartyclose <- NA
dat$lrplacepartyclose[dat$Party_Close=="party1"] <-
dat$lrplaceParty1[dat$Party_Close=="party1"]
dat$lrplacepartyclose[dat$Party_Close=="party2"] <-
dat$lrplaceParty2[dat$Party_Close=="party2"]
and goes on and on.
On 23 March 2010 17:47, Thomas
I am not entirely sure what you are trying to do. Are you wanting to
re-arrange the columns or apply some sort of transformation?
On Tue, Mar 23, 2010 at 4:47 AM, Thomas Jensen
wrote:
> Dear R Experts,
>
> I am having some trouble creating a variable in R. I have data on
> self-placement of vote
2 matches
Mail list logo