[R-sig-eco] keeping a variable as qualitative even if it is coded with numbers
Chris Howden
chris at trickysolutions.com.au
Sat Nov 27 01:47:00 CET 2010
What do u mean it includes the 0's in your analysis?
Are u sure as.factor is converting them to factors (have a look using
str(data))
And if as.factor isn't working maybe try creating them as factors using
factor()
Chris Howden
Founding Partner
Tricky Solutions
Tricky Solutions 4 Tricky Problems
Evidence Based Strategic Development, IP Commercialisation and Innovation,
Data Analysis, Modelling, and Training
(mobile) 0410 689 945
(fax / office) (+618) 8952 7878
chris at trickysolutions.com.au
-----Original Message-----
From: r-sig-ecology-bounces at r-project.org
[mailto:r-sig-ecology-bounces at r-project.org] On Behalf Of amelie_can
Sent: Saturday, 27 November 2010 3:11 AM
To: r-sig-ecology at r-project.org
Subject: [R-sig-eco] keeping a variable as qualitative even if it is coded
with numbers
Hello,
I am running a fourthcorner analysis which links species abundance,
functionnal traits and environmental variable. One of my trait is about
seed
dispersal (qualitative variable) in which I have four classes: wind,
water,
short and long distance. One species can have many types of dispersal. So
in
my original table, I created four different column.
ex:
wind water short long
sp1 1 1 0 0
sp2 0 0 1 0
sp3 0 1 1 1
and so forth. My problem is that those variable are considered as
quantitative but they are qualitative.
I tried to transform them using the function as.factor but then it
includes
the 0 in my analysis and I am not interest in that.
Any ideas to make those variable "qualitative"?
Thank you all,
Amelie
--
View this message in context:
http://r-sig-ecology.471788.n2.nabble.com/keeping-a-variable-as-qualitativ
e-even-if-it-is-coded-with-numbers-tp5778025p5778025.html
Sent from the r-sig-ecology mailing list archive at Nabble.com.
_______________________________________________
R-sig-ecology mailing list
R-sig-ecology at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
More information about the R-sig-ecology
mailing list