Re: [R] package FD

2016-03-24 Thread Fabio Monteiro
Hi again Is there any way to check the relations between dbFD indexes? Function cor for example? I can't manage to put the informations correctly 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 201

Re: [R] package FD

2016-03-06 Thread Jim Lemon
The values in a$x do look numeric. What do you get from: class(a$x) If the result is "factor", as it was for your ft$trait3 variable (and I hope that a$x is the same variable with a different name), then at least one of those values must have been read in as non-numeric. The possible reasons for

Re: [R] package FD

2016-03-06 Thread Jeff Newmiller
That code doesn't show what a$x IS, just what comes out after you force things. The fact that you felt compelled to apply those functions just makes it seem more likely that Jim is onto something. The output of str( a$x ) would show what kind of data it is, and dput( a$x ) would let us put th

Re: [R] package FD

2016-03-06 Thread Fabio Monteiro
Hey Jim they are all numeric as you can see as.numeric(as.character(a$x)) [1] 20.0 50.0 7.9 25.0 20.0 20.0 15.0 30.0 48.0 75.0 75.0 25.0 300.0 [14] 103.0 20.0 45.0 15.0 20.0 50.0 6.0 18.0 59.0 70.0 80.0 100.0 40.0 [27] 15.0 30.0 40.0 60.0 9.0 11.0 27.5 75.0 60.

Re: [R] package FD

2016-03-05 Thread Jim Lemon
Hi Fabio, What has probably happened is that ft$trait3 looks like numbers but when it was read in at least one value could not be read as a number. The default behavior in R is to transform the variable into a factor: testcase<-read.table(text="1 2 3 4 1 2 3 4 1 2 B 4") > testcase V1 V2 V3 V4 1

Re: [R] package FD

2016-03-03 Thread Jim Lemon
Hi Fabio, You should write: class(...) where ... is the same as what you would type to have the variable displayed on the console. Looking at your earlier message, it might be: x$trait3 so try: class(x$trait3) Jim On Fri, Mar 4, 2016 at 11:30 AM, Fabio Monteiro wrote: > i just called trait

Re: [R] package FD

2016-03-03 Thread Fabio Monteiro
i just called trait3 to my variable. Is this what i'm suppose to wright? class(trait3), or class (my_trait3_variable? both give error 2016-03-03 23:42 GMT+00:00 Jim Lemon : > Hi Fabio, > It is possible that your remaining "numeric" variable is a factor. What > does: > > class(my_numeric_variabl

Re: [R] package FD

2016-03-03 Thread Jim Lemon
Hi Fabio, It is possible that your remaining "numeric" variable is a factor. What does: class(my_numeric_variable) say? (where you substitute the name of your "numeric" variable) Jim On Fri, Mar 4, 2016 at 2:25 AM, Fabio Monteiro wrote: > Hello, my name is Fábio and I'm a Marine Ecology stude

[R] package FD

2016-03-03 Thread Fabio Monteiro
Hello, my name is Fábio and I'm a Marine Ecology student in Portugal. I'm currently using the FD package for my work and yesterday one message appeared that I wasn't expecting and I really need your help to try to figure out what's happening. I'm using the dbFD function and the following message a