-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
Description
Hello, a colleague reached out for help with the fourthcorner function. I found that he was passing in a tibble and not a straight data.frame which causes the is.numeric() on line 85 of fourthcorner.R to return FALSE. But the is.data.frame(tabR) check on line 12 passes. E.g.,:
library(ade4)
library(dplyr)
data(aviurba)
# tabR
envVars <- aviurba$mil
#tabL
sppAbundances <- aviurba$fau
#tabQ
sppTraits <- aviurba$traits
foo <- fourthcorner(tabR = envVars,
tabL = sppAbundances,
tabQ = sppTraits,
nrepet=99)
envVars <- as_tibble(aviurba$mil)
bar <- fourthcorner(tabR = envVars,
tabL = sppAbundances,
tabQ = sppTraits,
nrepet=99)
Perhaps an as.data.frame coercion on tibbles would solve this.
Thanks for a great pacakge.