Good morning everybody,
after updating my R to the most recent version (4.1.2), including the most recent geomorph (4.0.1) and RRPP package, I find myself unable to re-run code that worked just fine before (R 4.1.0, geomorph 4.0.0). While importing data, procrustes analysis and creating a geomorph.data.frame works just fine, I cannot run my models (procD.lm or lm.rrpp) anymore. That is because R returns this error: "ERROR: duplicate 'row.names' are not allowed" and I cannot figure out why. Looking at the structure of the geomorph.data.frame, I cannot find anything unusual either.
Here is my code:
Data <- readland.tps("measurements.tps",
specID = c("ID"),
negNA = FALSE,
warnmsg = TRUE,
readcurves = TRUE
)
define.sliders(Data[,,1], nsliders=18, surfsliders = FALSE, write.file=T)
datcurves <- as.matrix(read.csv("curveslide.csv", header=T))
shape <- gpagen(Data, curves=datcurves)$coords
csize <- gpagen(Data, curves=datcurves)$Csize
extra <- read.table("extra-data.txt", header=TRUE, stringsAsFactors=TRUE, sep="\t", na.strings="NA", dec=".", strip.white=TRUE)
dat.full <- geomorph.data.frame(coords=shape, csize=csize, family=extra$cage)
str(dat.full)
List of 3
$ coords : num [1:29, 1:2, 1:127] 0.270 0.224 0.220 0.191 0.132 ...
..- attr(*, "dimnames")=List of 3
.. ..$ : chr [1:29] "1" "2" "3" "4" ...
.. ..$ : chr [1:2] "X" "Y"
.. ..$ : chr [1:127] "0 " "1 " "2 " "3 " ...
$ csize : Named num [1:127] 14.7 11.3 13.6 13.5 13 ...
..- attr(*, "names")= chr [1:127] "0 " "1 " "2 " "3 " ...
$ family : Factor w/ 11 levels "A1","B1",..: 9 9 10 11 1 4 11 4 10 10 ...
- attr(*, "class")= chr "geomorph.data.frame"
m.1<-procD.lm(coords~csize+family, iter=999, data=dat.full, RRPP=TRUE, SS.type="II", print.progress=FALSE)
ERROR: duplicate 'row.names' are not allowed
Might anyone here see what is wrong? The code ran just fine in the older R version.
Thank you for your help!
Bob