[R] Error: length(f1) == length(f2) is not TRUE
A Singh
Aditi.Singh at bristol.ac.uk
Fri Sep 18 13:41:57 CEST 2009
Dear R users,
I am trying to fit an lmer model with only random effects which is giving
me the following error:
Error : length(f1) == length(f2) is not TRUE
In addition: Warning messages:
1: In P1L55:family :
numerical expression has 390 elements: only the first used
2: In P1L55:family :
numerical expression has 390 elements: only the first used
I am trying to extract variance components for a phenotype 'peg.no', using
the variable 'family' and a marker column 'P1L55' (which is categorical and
has 2 levels- 0 and 1), as random effects. There are no fixed effects.
The code I used is as follows:
vc<-read.table(...)
vcdf<-data.frame(vc)
colms<-(vc)[4:13] ##these are the markers
lapply(colms,factor)
try(fit<-lmer(peg.no~1 + (1|family/P1L55), na.action=na.include, data=vcdf))
I thought that putting the data into a dataframe would help, along with the
na.exclude command, because there is a lot of missing data in patches which
I have replaced with NA's, but I don't know how to fix this error at all.
Its a bit urgent, and any help is hugely appreciated.
The data files are at:
<http://www.4shared.com/file/131980362/460bdafe/Testvcomp10.html> (excel)
http://www.4shared.com/file/131980512/dc7308b/Testvcomp10.html
(txt)
Cheers,
Aditi
----------------------
A Singh
Aditi.Singh at bristol.ac.uk
School of Biological Sciences
University of Bristol
More information about the R-help
mailing list