Dear all,
Is there a way of keeping the actual information in a factor when
converting it to numeric?
Example:
What I want:
as.numeric(factor(5:10))
5, 6, 7, 8, 9, 10
How R works:
as.numeric(factor(5:10)) #R example on 'as.numeric'
[1] 1 2 3 4 5 6
Thank you very much.
Paulo
cannot find what is going wrong.
Regards,
Paulo
-Mensagem original-
De: Thomas Lumley [mailto:[EMAIL PROTECTED]
Enviada em: Wednesday, March 08, 2006 9:15 AM
Para: Paulo Brando
Cc: r-help@stat.math.ethz.ch
Assunto: Re: [R] survival
On Wed, 8 Mar 2006, Paulo Brando wrote:
Dear R
Hi ling, save your file as 'csv'.
I always use the following script:
NAME - read.table(C:LOCATION/FILE NAME.csv, header = TRUE, sep =
,, na.string=.)
Paulo M. Brando
Instituto de Pesquisa Ambiental da Amazonia (IPAM)
Santarem, PA, Brasil.
Av. Rui
Dear All,
I created a script to calculate averages - two groups: parcel and
date - and, based on these averages, make a graph. The problem is that
'R' does not recognize the first column even if I try to insert one.
A brief example
Raw data:
Data - sample(1:100, 30, replace = FALSE, prob =
-
De: Adaikalavan Ramasamy [mailto:[EMAIL PROTECTED]
Enviada em: Tuesday, June 14, 2005 3:17 AM
Para: Paulo Brando
Cc: R-help@stat.math.ethz.ch
Assunto: Re: [R] Learning, if and else
You can also use switch() instead of ifelse(), which makes the code a
bit easier to read. The downside
Dear Rs,
I have tried to use conditional expressions to calculate biomass for
different life forms (trees, lianas, and palms).
Here is an example:
lifeform
dbh form
1 30 tree
2 29 tree
3 28 tree
4 27 tree
5 26 tree
6 25 tree
7 24 tree
8 23 tree
9 22 tree
10
Dear Rs,
I have tried to use conditional expressions to calculate biomass for
different life forms (trees, lianas, and palms).
Here is an example:
lifeform
dbh form
1 30 tree
2 29 tree
3 28 tree
4 27 tree
5 26 tree
6 25 tree
7 24 tree
8 23 tree
9 22 tree
10
!
Paulo
Paulo Brando
Inst. de Pesquisa Ambiental da Amazônia (IPAM)
Rua Rui Barbosa,136.
68.005.080 Santarém, PA, Brasil.
Fone/Fax ++ 55 93 522 5538
www.ipam.org.br
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch mailing list
https
A BORDA 1 38233
A C 1 38233 15.6 1.7 4.9 0.374 2 0.298 3 0.231 1
A F 1 38233 14 1.5 3.5 0.366 45 0.153 1 0.15 1
Paulo Brando
Inst. de Pesquisa Ambiental da Amazônia (IPAM)
Rua Rui Barbosa,136.
68.005.080