assign(levels(data$Species)[1], 1:10)
or you might want to consider the use of a list depending on what you
are trying to do.
On Thu, Oct 1, 2009 at 7:26 PM, jimdare wrote:
>
> Hi,
>
> If I have a dataset called "data" with a factor called "Species" that has
> three levels "Sp1", "Sp2", and "Sp3
Hi,
If I have a dataset called "data" with a factor called "Species" that has
three levels "Sp1", "Sp2", and "Sp3". Is there a way to name an object
after a specific level? I have tried the code below and get the error
"error in paste(levels(data$Species)[1]) <- 1:10 could not find function
"
2 matches
Mail list logo