[R] variables - data-structure
John Fox
jfox at mcmaster.ca
Sat Dec 18 15:01:00 CET 2004
Dear Helmut,
How about table(species, sample)?
Regards,
John
--------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox
--------------------------------
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Helmut
> Kudrnovsky
> Sent: Saturday, December 18, 2004 8:31 AM
> To: r-help at stat.math.ethz.ch
> Subject: [R] variables - data-structure
>
> dear R-friends,
>
> i`ve got a large dataset of vegetation-samples with about 500
> variables(=species) in the following format:
>
> 1 spec1
> 1 spec23
> 1 spec54
> 1 spec63
> 2 spec1
> 2 spec2
> 2 spec253
> 2 spec300
> 2 spec423
> 3 spec20
> 3 spec88
> 3 spec121
> 3 spec200
> 3 spec450
> .
> .
>
> this means: sample 1 (grassland) with the species (=spec) 1,
> 23, 54, 63
>
> is it possible to get a following data-structure for further analysis?
>
> 1 2 3 ......
> spec1 1 1 0
> spec2 0 1 0
> spec3
> ...
> spec253 0 1 0
> ...
> spec450 0 0 1
>
> with thanks from the snowy tirol
> helli
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
More information about the R-help
mailing list