> #### INPUTS
> # trait: the name of the trait under study, has to be the name of the column in df)
> # df: a matrix or data frame with species as rows, and traits as columns, must have species names as rownames.
> df=matrix(c(18.72,20.10,23.50,26.00,27.80,25.94,8.62,10.86,9.42,8.17,16.00,10.70,14.85,13.00,15.41,6.90,2.04,5.50,4.50,4.50,6.16,6.16,8.61,5.08,5.96,6.49,4.50,5.60,7.11,5.75,5.52,3.35,4.85,3.72,5.30,4.40,2.33,2.48,3.05,5.61,5.03,2.70,2.00,2.39,2.96,6.75,5.53,5.95,4.37,9.96,18.50,43.50,46.09,41.47,42.50,5.79,3.00,5.50,4.87,6.10,4.62,3.00,3.83,3.30,5.10,22.30,22.57,38.50,27.93,26.11,20.30,32.80,28.08,25.08,24.67,20.60,29.30,22.50,28.96,35.75,10.07,9.48,5.83,6.06,7.50,23.33,32.50,28.67,31.00,29.33,8.08,8.44,9.83,10.92,9.83,8.70,7.50,14.47,13.60,8.10,6.00,12.22,16.44,12.00,15.30),nrow=21,byrow=T)
> rownames(df) <- c("SP1", "SP2", "SP3", "SP4", "SP5","SP6", "SP7", "SP8", "SP9", "SP10","SP11", "SP12", "SP13", "SP14", "SP15","SP16", "SP17", "SP18", "SP19", "SP20","SP21")
> colnames(df) <- c("trait", "trait", "trait", "trait", "trait")
> df <- as.data.frame(df)
> df[,trait]=as.numeric(df[,trait])
Error in `[.data.frame`(df, , trait) : object 'trait' not found
> t=na.omit(df2vec(df,trait))
Error in na.omit(df2vec(df, trait)) : could not find function "df2vec"
> t=t[names(t)%in%names(comm)]
请问object 'trait' not found是怎么回事