Skip to content

Instantly share code, notes, and snippets.

@pecard
Created March 21, 2010 23:07
Show Gist options
  • Save pecard/339639 to your computer and use it in GitHub Desktop.
Save pecard/339639 to your computer and use it in GitHub Desktop.
#! Compositional Analysis
#! Paulo Eduardo Cardoso
library(adehabitat)
#! Análise Compana para matrizes lidas a partir do clipboard.
usado <- read.delim("clipboard", sep = "\t", dec = ".", header = T)
#! Remove linhas sem dados - NA
usado <- usado[!is.na(usado[1]),]
#! Constroi a matriz de disponiveis alterando os valores em dispo
dispo <- as.data.frame(cbind(rep(27.3,nrow(usado)),rep(19.8,nrow(usado)),rep(80.2,nrow(usado))))
names(dispo) <- names(usado)
#! Análise - substitui Zeros por rnv
np <- compana(usado, dispo,test = "randomisation", rnv = 0.001, nrep = 10000, alpha = 0.05)
np
np$rm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment