[R-sig-ME] Variable () converted to a factor
lancelot
renaud.lancelot at cirad.fr
Wed Jun 8 19:03:58 CEST 2011
In your database, numeric variables are stored using the comma as the
decimal delimiter. R recognises these variables as vectors of character
strings. Use the dot as the decimal delimiter instead, or convert the
comma to a dot during importation.
All the best,
Renaud
Le 08/06/2011 18:54, Iker Vaquero Alba a écrit :
>
> sessionInfo()
> R version 2.13.0 (2011-04-13)
> Platform: i386-pc-mingw32/i386 (32-bit)
>
> locale:
> [1] LC_COLLATE=Spanish_Spain.1252 LC_CTYPE=Spanish_Spain.1252
> [3] LC_MONETARY=Spanish_Spain.1252 LC_NUMERIC=C
> [5] LC_TIME=Spanish_Spain.1252
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
>
> other attached packages:
> [1] lme4_0.999375-39 Matrix_0.999375-50 lattice_0.19-23 nlme_3.1-100
> [5] MASS_7.3-12
>
> loaded via a namespace (and not attached):
> [1] grid_2.13.0 stats4_2.13.0
>
>
>
> str(inslarge)
> chr [1:31] "1,107710913" "1,107710913" "0,97850759" "1,800528121" ...
>
> str(tlengthcoef)
> chr [1:31] "0,010580151" "0,021636091" "0,004123072" "0,10487174" ...
>
>
>
> Thank you very much.
>
> Iker
>
>
>
>
>
>
> ________________________________
> De: Douglas Bates<bates at stat.wisc.edu>
>
> CC: r-sig-mixed-models at r-project.org
> Enviado: mié,8 junio, 2011 18:14
> Asunto: Re: [R-sig-ME] Variable () converted to a factor
>
> Could you please send us the output from
>
> library(lme4)
> sessionInfo()
> # whatever you do to attach your data
> str(inslarge)
> str('tlengthcoef)
>
>
>
> ote:
>>
>> Hello, list:
>>
>> I am trying to implement a model with lmer. The dependent variable is
>> different insect abundances for different sites, and the explanatory variables
>> are several coefficients of variation for the intensity of different sexual
>> signals shown by swallows nesting in those sites. Measures were taken in two
>> different years, so I included "year" as a random factor. As I was getting an
>> error message, I decided to simplify the amalysis just to check were the
>> problem
>> could be. Still with the simplest possible analysis:
>>
>> insectmodel2<-lmer(inslarge~tlengthcoef+(1|year))
>>
>> I still get this message (sorry some parts are in Spanish, I don't know how
>> to change that):
>>
>> Mensajes de aviso perdidos
>> 1: In model.matrix.default(mt, mf, contrasts) :
>> variable 'inslarge' converted to a factor
>> 2: In model.matrix.default(mt, mf, contrasts) :
>> variable 'tlengthcoef' converted to a factor
>> 3: In function (fr, FL, start, REML, verbose) :
>> NAs introducidos por coerción (NAs introduced by coercion
>>
>> It's funny that it converts my variables to factors when I've been
> struggling
>> for that not to happen when attaching the data set.
>> Anyone can help me explain and deal with this problem? Thank you very much!
>>
>> Iker
>> [[alternative HTML version deleted]]
>>
>>
>> _______________________________________________
>> R-sig-mixed-models at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>>
>>
>
> [[alternative HTML version deleted]]
>
>
>
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
--
Renaud Lancelot
EDENext Project, coordinator: http://www.edenext.eu/
CIRAD, UMR15, Campus International de Baillarguet TA A-DIR / B
F34398 Montpellier
Tel. +33 4 67 59 37 17 - Fax +33 4 67 59 37 95
Secr. +33 4 67 59 37 37 - Cell. +33 6 77 52 08 69
More information about the R-sig-mixed-models
mailing list