Following our successful book: 'A Beginner's Guide to R', we are please to
announce an online R course based on this book.
Video/audio files
Discussion board
Video footage of instructors
Nearly every section of 'A Beginner's Guide to R' is covered. Each
chapter is presented as a powerpoint vide
Personally I use the decostand function in the vegan package, with
method="pa".
Example:
library(vegan)
data(dune)
dunePresAbs = decostand(x=dune, method="pa")
#End run
What this does is:
x <- ifelse(x > 0, 1, 0)
where x is each square.
Regards,
Adrian Rasmussen
[[alternative HTML ver
It works even for a data.frame:
M=matrix(sample(c(0,1,2,3),25, rep=T),5,5)
M=data.frame(M)
M
X1 X2 X3 X4 X5
1 1 3 3 3 2
2 2 0 1 0 0
3 2 1 0 2 2
4 2 1 3 1 2
5 2 2 3 0 3
M[M>0] <-1
M
X1 X2 X3 X4 X5
1 1 1 1 1 1
2 1 0 1 0 0
3 1 1 0 1 1
4 1 1 1 1 1