Re: [R] Correlation between package output

2016-04-12 Thread Sarah Goslee
Hi Fabio,

Using the first example from ?dbFD

ex1 <- dbFD(dummy$trait, dummy$abun)

If you look at that help page, or at str(ex1), you'll see that the
returned object is a list with named components. So, you can access
the different indices just as you would access any other list. If
that's confusing to you, a good basic intro to R might be just the
thing.

Here are two ways to do so:
with(ex1, plot(nbsp, FRic))
cor(ex1$nbsp, ex1$FRic, use="pair") # the toy example has one NA value

You might in the future find R-sig-ecology to be a better place to ask
this sort of question.

Sarah


On Mon, Apr 11, 2016 at 9:20 AM, Fabio Monteiro
 wrote:
> Hello
>
> I'm currently using the dbFD function of the FD package and i'm having some
> things that I can't do.
>
> Is there any way to check the relations between dbFD indexes?
>
> Function cor for example? I can't manage to put the informations correctly
>
> dbFD function gives a lot of output (indexes - nbsp, sing.sp, FRic, FEve,
> FDiv, FDis and RaoQ). I want to see the relationships between the dbFD
> output (nbsp, sing.sp, FRic, FEve, FDiv, FDis and RaoQ)
>
> How should I type it?
>
> Thank you
>
> Fábio
>

-- 
Sarah Goslee
http://www.functionaldiversity.org

__
R-help@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.

[R] Correlation between package output

2016-04-11 Thread Fabio Monteiro
Hello

I'm currently using the dbFD function of the FD package and i'm having some
things that I can't do.

Is there any way to check the relations between dbFD indexes?

Function cor for example? I can't manage to put the informations correctly

dbFD function gives a lot of output (indexes - nbsp, sing.sp, FRic, FEve,
FDiv, FDis and RaoQ). I want to see the relationships between the dbFD
output (nbsp, sing.sp, FRic, FEve, FDiv, FDis and RaoQ)

How should I type it?

Thank you

Fábio

[[alternative HTML version deleted]]

__
R-help@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.