[R] subset factor?

Silvano silvano at uel.br
Fri Jan 14 15:08:01 CET 2011


Hi,

I used subset command, like this:

grupoP = subset(dados, grupos=='P',  select=c(mortos, vivos, 
doses, percevejos, p))

and the variables in select option are numeric.

I tried fit a model with command:

ajuste.logit = glm(cbind(mortos,percevejos)~log10(doses), 
family=binomial(logit), data=grupoP)

and the output is:

> ajuste.logit = glm(cbind(mortos,percevejos)~log10(doses), 
> family=binomial(logit), data=grupoP)
Erro em Math.factor(doses) : log10 not meaningful for 
factors

what is wrong with my commands? Why doses aren't numeric?

Thanks,

--------------------------------------
Silvano Cesar da Costa
Departamento de Estatística
Universidade Estadual de Londrina
Fone: 3371-4346



More information about the R-help mailing list