[R] error message in package "FD", function dbFD ()

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Wed Jul 15 17:20:33 CEST 2015


Thank you for making an effort, but your example is still not reproducible. Study something like [1] for more clarity on how to communicate online. Problems that you encounter in getting your data into R are different than problems with the functions in base R or contributed packages, and a reproducible example using dput to give us the data allows us to distinguish the two.

Regarding your request for an Excel example, that is unlikely to occur given that this is an R help mailing list. There are many example data sets in base R and contributed packages. Have you read the examples on the help page for the FD package? Try

?FD-package

[1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

On July 15, 2015 6:47:22 AM PDT, lauraRIG <laura.riggi at slu.se> wrote:
>Dear R community,
>
>I  have some trouble with the dbFD function in the FD package. 
>> str(a)
>'data.frame':    150 obs. of  48 variables:
>> str(x)
>'data.frame':    48 obs. of  9 variables:
>
>ex1 <- dbFD(x,a)
>Error in dbFD(x, a) : 
>  Species labels in 'x' and 'a' need to be identical and ordered
>alphabetically (or simply in the same order).
>
>I have checked multiple time the data set but this message keeps on
>appearing. The names of the species are identical in both data.frames. 
>
>I was wondering if you could help me by giving me an example of an
>excel
>trait and species matrix table to upload for this package. Below is a
>snapshop of my data. I have also checked that there are no NA’s
>problems and
>that there is no species abundance = 0 or no community with 0 species.
>
>Thank you for any advice!
>Best
>Laura 
>
>Species table (a)
>Agonum_assimile	Agonum_dorsale	Agonum_gracile	Agonum_gracilipes
>2	3	0	0
>0	6	0	0
>1	10	0	0
>1	5	0	0
>0	8	0	0
>2	7	0	0
>1	6	0	0
>
>
>Trait table(x)
>
>Species	         SizeCategoy Ecology	Reproduction	Diet	Wing
>Agonum_assimile	C	nocturnal	spring	Carnivorous	Brachypterous
>Agonum_dorsale       	B	nocturnal	spring	Carnivorous	Macropterous
>Agonum_gracile	       B	diurnal	spring	Carnivorous	Macropterous
>Agonum_gracilipes	B	both	        spring	Carnivorous	Macropterous
>
>
>
>
>
>--
>View this message in context:
>http://r.789695.n4.nabble.com/error-message-in-package-FD-function-dbFD-tp4709896.html
>Sent from the R help mailing list archive at Nabble.com.
>
>______________________________________________
>R-help at 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.



More information about the R-help mailing list