Re: [R] Creating a new variable from existing ones

2011-01-26 Thread David Winsemius
On Jan 26, 2011, at 2:06 PM, Melanie Zoelck wrote: Hi, I am relatively new to R and have a question regarding code. I have a data set which has data organised by location (site names, which are factors). I now want to add a new variable Region (this will be non numerical, as it will be n

[R] Creating a new variable from existing ones

2011-01-26 Thread Melanie Zoelck
Hi, I am relatively new to R and have a question regarding code. I have a data set which has data organised by location (site names, which are factors). I now want to add a new variable Region (this will be non numerical, as it will be names). Each region will contain locations. So for example: