[R] FD package_dbFD error
Bert Gunter
bgunter@4567 @end|ng |rom gm@||@com
Thu Apr 1 00:42:38 CEST 2021
I think you would more likely find the help you seek on the r-sig-ecology
list rather than here.
Also, do note per the posting guide linked below:
"For questions about functions in standard packages distributed with R (see
the FAQ Add-on packages in R
<https://cran.r-project.org/doc/FAQ/R-FAQ.html#Add-on-packages-in-R>), ask
questions on R-help.
If the question relates to a *contributed package* , e.g., one downloaded
from CRAN, try contacting the package maintainer first [who you can find
via ?maintainer]. You can also use find("functionname") and
packageDescription("packagename") to find this information. *Only* send
such questions to R-help or R-devel if you get no reply or need further
assistance. This applies to both requests for help and to bug reports."
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Wed, Mar 31, 2021 at 3:32 PM Vesna Gulin <vesna.gulin using biol.pmf.hr> wrote:
> Hi everyone,
>
> I am trying to conduct dbFD from the FD package, but it keeps giving me
> the same error:
>
> ex1 <- dbFD(sites, traits)
> Error in dbFD(sites, traits) :
> Different number of species in 'x' and 'a'.
>
> Ab, bb, Ci.... are species names.
> I have tried rewriting the species names so many times and ways, but
> nothing seems to work. I also checked for blank space but can't seem to
> find one. Does anyone have and idea what am I doing wrong?
>
> My data consists of two data frames:
> sites
>
> X Ab Bb Ci Cb Cbm Cdo Cm Cdi Dv Edi Ee Ede Es Eb Gc La Mm Op Oc Oh Or
> Pgr Ps Pgi Pf Pgri Po Pp Rr Ss Sl Ts Tv Tr
> 1 A 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0
> 0 0 0 0 0 0 0 0 0 0 0 0 0
> 2 B 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 2 0 0 0
> 0 0 0 0 0 0 0 0 0 0 0 0 0
> 3 C 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> 0 0 0 0 0 1 0 0 0 0 0 0 0
> 4 D 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> 0 0 0 0 0 0 0 0 0 0 0 0 0
> 5 E 0 0 0 0 0 0 0 3 2 3 0 0 0 0 0 0 0 0 0 4 0
> 0 0 0 0 0 0 0 0 0 0 0 0 0
> 6 F 0 0 0 0 0 0 0 0 3 0 1 0 0 4 1 8 0 1 3 2 0
> 0 0 0 0 0 0 0 0 0 0 0 0 2
> 7 G 0 0 0 0 0 0 1 1 1 2 0 0 0 0 0 0 0 0 1 4 0
> 0 0 0 0 0 0 0 0 0 0 0 0 0
>
> traits
>
> X body ration flight feeding lifestyle moisture
> 1 Ab 29.5 0.6203390 none herbivorous geo-chortobiont xerophilous
> 2 Bb 16.0 1.0625000 reduced omnivorous chortobiont mesophilous
> 3 Ci 23.5 0.5829787 full omnivorous geo-chortobiont xerophilous
> 4 Cb 18.0 0.6000000 full herbivorous chortobiont mesophilous
> 5 Cbm 18.0 0.6000000 full herbivorous chortobiont mesophilous
> 6 Cdo 17.5 0.6342857 reduced herbivorous chortobiont mesophilous
> 7 Cm 17.5 0.5914286 full herbivorous chortobiont mesophilous
> 8 Cdi 21.5 0.5883721 reduced herbivorous chortobiont hygrophilous
> 9 Dv 34.0 0.9044118 reduced carnivorous geo-chortobiont mesophilous
> 10 Edi 27.0 0.7222222 none omnivorous thamnobiont xerophilous
> 11 Ee 25.0 0.6400000 none omnivorous thamnobiont mesophilous
> 12 Ede 20.5 0.5902439 none herbivorous chortobiont xerophilous
> 13 Es 25.5 0.9803922 none omnivorous thamnobiont mesophilous
> 14 Eb 18.0 0.6416667 reduced herbivorous chortobiont mesophilous
> 15 Gc 22.5 0.4555556 none omnivorous geobiont mesophilous
> 16 La 13.0 0.9807692 none herbivorous chortobiont mesophilous
> 17 Mm 18.0 1.0972222 none omnivorous geo-chortobiont xerophilous
> 18 Op 12.0 0.6666667 full omnivorous thamnobiont xerophilous
> 19 Oc 21.0 0.5690476 full herbivorous geobiont xerophilous
> 20 Oh 15.5 0.5967742 reduced herbivorous chortobiont mesophilous
> 21 Or 15.5 0.7193548 reduced herbivorous chortobiont mesophilous
> 22 Pgr 17.0 1.0588235 none omnivorous thamnobiont mesophilous
> 23 Ps 21.5 1.0465116 none omnivorous thamnobiont mesophilous
> 24 Pgi 14.0 0.5500000 none herbivorous chortobiont mesophilous
> 25 Pf 26.5 0.9622642 none omnivorous thamnobiont mesophilous
> 26 Pgri 17.5 1.0428571 none omnivorous thamnobiont mesophilous
> 27 Po 17.0 0.8970588 none herbivorous chortobiont mesophilous
> 28 Pp 17.5 0.6542857 reduced herbivorous chortobiont mesophilous
> 29 Rr 17.5 0.8857143 reduced omnivorous chortobiont mesophilous
> 30 Ss 22.5 0.5733333 full herbivorous chortobiont mesophilous
> 31 Sl 20.5 0.6268293 reduced herbivorous chortobiont mesophilous
> 32 Ts 12.5 0.4720000 reduced herbivorous geobiont hygrophilous
> 33 Tv 33.0 0.7803030 full carnivorous thamnobiont mesophilous
> 34 Tr 20.0 0.9000000 none omnivorous geobiont hygrophilous
>
>
> Thank you in advance and kind regards,
> Vesna
>
>
> --
> Vesna Gulin, Research and Teaching Assistant
> Department of Biology
> Faculty of Science
> University of Zagreb
> Rooseveltov trg 6, 10000 Zagreb, Croatia
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
[[alternative HTML version deleted]]
More information about the R-help
mailing list