Apresentar a linguagem de programação estatística R, com o propósito de torná-la uma ferramenta útil para análises de dados ecológicos
2+3+4+7
## [1] 16
5-5-8
## [1] -8
6*3*3
## [1] 54
Tarefa que se torna crítica a medida que trabalhamos com grandes projetos
Informações para serem utilizadas como referência futura e/ou por terceiros;
s<-c(10, 4, 15, 10) #Número de espécies em parcelas
s
## [1] 10 4 15 10
x<-1
x
## [1] 1
y<-5
x+y
## [1] 6
especies<-c("Araucaria angustifolia", "Lithraea brasiliensis",
"Jacaranda puberula")
especies
## [1] "Araucaria angustifolia" "Lithraea brasiliensis"
## [3] "Jacaranda puberula"
c(1,2,3,4,5,6,7,8,9,10)
## [1] 1 2 3 4 5 6 7 8 9 10
(1:10)
## [1] 1 2 3 4 5 6 7 8 9 10
seq(from=0, to=100, by = 10)
## [1] 0 10 20 30 40 50 60 70 80 90 100
rep("norte", 10)
## [1] "norte" "norte" "norte" "norte" "norte" "norte" "norte" "norte"
## [9] "norte" "norte"
c(rep("norte",10), rep("sul", 10))
## [1] "norte" "norte" "norte" "norte" "norte" "norte" "norte" "norte"
## [9] "norte" "norte" "sul" "sul" "sul" "sul" "sul" "sul"
## [17] "sul" "sul" "sul" "sul"
dinamica<-matrix(c(1,2,9,8,22,14,4,5,2), nc=3)
colnames(dinamica)<-c("P", "CEL", "CTS")
rownames(dinamica)<-c("Aumentou", "Estável", "Reduziu")
dinamica
## P CEL CTS
## Aumentou 1 8 4
## Estável 2 22 5
## Reduziu 9 14 2
areas<-array(1:40, dim=c(4,5,4))
areas
## , , 1
##
## [,1] [,2] [,3] [,4] [,5]
## [1,] 1 5 9 13 17
## [2,] 2 6 10 14 18
## [3,] 3 7 11 15 19
## [4,] 4 8 12 16 20
##
## , , 2
##
## [,1] [,2] [,3] [,4] [,5]
## [1,] 21 25 29 33 37
## [2,] 22 26 30 34 38
## [3,] 23 27 31 35 39
## [4,] 24 28 32 36 40
##
## , , 3
##
## [,1] [,2] [,3] [,4] [,5]
## [1,] 1 5 9 13 17
## [2,] 2 6 10 14 18
## [3,] 3 7 11 15 19
## [4,] 4 8 12 16 20
##
## , , 4
##
## [,1] [,2] [,3] [,4] [,5]
## [1,] 21 25 29 33 37
## [2,] 22 26 30 34 38
## [3,] 23 27 31 35 39
## [4,] 24 28 32 36 40
y <- list(spp=c("Araucaria", "Prunus", "Ocotea"), dap=c(35,20,25))
y
## $spp
## [1] "Araucaria" "Prunus" "Ocotea"
##
## $dap
## [1] 35 20 25
spp <- c("Araucaria", "Prunus", "Ocotea")
dap <- c(35, 20, 25)
tabela <- data.frame(spp, dap)
tabela
## spp dap
## 1 Araucaria 35
## 2 Prunus 20
## 3 Ocotea 25
x<-c(3,4,5,6)
y<-c(4,5,6,9)
z<-c(x,y)
z
## [1] 3 4 5 6 4 5 6 9
rbind(x,y)
## [,1] [,2] [,3] [,4]
## x 3 4 5 6
## y 4 5 6 9
cbind(x,y)
## x y
## [1,] 3 4
## [2,] 4 5
## [3,] 5 6
## [4,] 6 9
genero<-"Myrcia"
epiteto<-c("oblongata", "palustris", "splendes")
especie<-paste(genero,epiteto)
especie
## [1] "Myrcia oblongata" "Myrcia palustris" "Myrcia splendes"
rep(especie, times=4)
## [1] "Myrcia oblongata" "Myrcia palustris" "Myrcia splendes"
## [4] "Myrcia oblongata" "Myrcia palustris" "Myrcia splendes"
## [7] "Myrcia oblongata" "Myrcia palustris" "Myrcia splendes"
## [10] "Myrcia oblongata" "Myrcia palustris" "Myrcia splendes"
rep(especie, each=4)
## [1] "Myrcia oblongata" "Myrcia oblongata" "Myrcia oblongata"
## [4] "Myrcia oblongata" "Myrcia palustris" "Myrcia palustris"
## [7] "Myrcia palustris" "Myrcia palustris" "Myrcia splendes"
## [10] "Myrcia splendes" "Myrcia splendes" "Myrcia splendes"
1+2 #adição
## [1] 3
4-3 #subtração
## [1] 1
5*5 #Multiplicação
## [1] 25
10/2 #Divisão
## [1] 5
5^2 #potência
## [1] 25
(5+5)*2 # O que tiver entre parentêses é calculado primeiro
## [1] 20
log(30) #logarítmo natural
## [1] 3.401197
sqrt(30) #raiz quadrada
## [1] 5.477226
exp(1) # Exponencial
## [1] 2.718282
sin (30) # O R trabalha com os ângulos em Radiano!
## [1] -0.9880316
sin(30*pi/180) # para transformar radiano em graus.
## [1] 0.5
cap<-c(35,160,20,30,50, 141,21,25)
cap
## [1] 35 160 20 30 50 141 21 25
dap<-cap/pi
dap
## [1] 11.140846 50.929582 6.366198 9.549297 15.915494 44.881694 6.684508
## [8] 7.957747
as<-(pi*dap^2)/40000
as
## [1] 0.009748240 0.203718327 0.003183099 0.007161972 0.019894368 0.158207971
## [7] 0.003509366 0.004973592
sum(as)
## [1] 0.4103969
bifurcacoes<-c(10,15,12)
sqrt(sum(bifurcacoes^2))
## [1] 21.65641
dap.fundido<-sqrt(sum(bifurcacoes^2))
dap.fundido
## [1] 21.65641
dap
## [1] 11.140846 50.929582 6.366198 9.549297 15.915494 44.881694 6.684508
## [8] 7.957747
dap[3]
## [1] 6.366198
dap[c(1,7)]
## [1] 11.140846 6.684508
max(dap)
## [1] 50.92958
min(dap)
## [1] 6.366198
summary(dap)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 6.366 7.639 10.350 19.180 23.160 50.930
| Operador | Resultado |
|---|---|
| x == y | Retorna TRUE se x for igual a y |
| x != y | Retorna TRUE se x for diferente de y |
| x > y | Retorna TRUE se x for maior do que y |
| x >= y | Retorna TRUE se x for maior ou igual a y |
| x < y | Retorna TRUE se x for menor do que y |
| x <= y | Retorna TRUE se x for menor ou igual a y |
dap
## [1] 11.140846 50.929582 6.366198 9.549297 15.915494 44.881694 6.684508
## [8] 7.957747
dap>10
## [1] TRUE TRUE FALSE FALSE TRUE TRUE FALSE FALSE
which(dap>10)
## [1] 1 2 5 6
area.sec <- function(x){
dap <- x/pi
as <- (pi*dap^2)/40000
return(list(areas.seccionais =as,soma.as=sum(as)))
}
area.sec(cap)
## $areas.seccionais
## [1] 0.009748240 0.203718327 0.003183099 0.007161972 0.019894368 0.158207971
## [7] 0.003509366 0.004973592
##
## $soma.as
## [1] 0.4103969
Obs: fazer o download do arquivo em http://db.tt/ZVjVc8n9 e http://db.tt/U0yHCgll
dados<-read.table("vegetation_data.csv", header=T,
sep=";", dec=",")
amb<-read.table("environmental_data.csv",header=T,
sep=";", dec=",", row.names=1)
#dados<-read.table(file.choose(), header=T, sep=";", dec=",")
#amb<-read.table(file.choose(),header=T, sep=";", dec=",",
#row.names=1)
names(dados)
names(amb)
dim(dados)
dim(amb)
dados$dap
dados[,5]
dados[1,]
## parc Exp Family spp dap
## 1 1 Norte PRIMULACEAE Myrsine umbellata 12.7324
dados[c(1,16),]
## parc Exp Family spp dap
## 1 1 Norte PRIMULACEAE Myrsine umbellata 12.732395
## 16 1 Norte BIGNONIACEAE Jacaranda puberula 9.453804
cas.dec<-dados[dados$spp=="Casearia decandra", ]
head(cas.dec)
## parc Exp Family spp dap
## 13 1 Norte SALICACEAE Casearia decandra 5.000000
## 24 1 Norte SALICACEAE Casearia decandra 8.350464
## 28 1 Norte SALICACEAE Casearia decandra 8.276057
## 30 1 Norte SALICACEAE Casearia decandra 6.684508
## 32 1 Norte SALICACEAE Casearia decandra 5.825071
## 38 1 Norte SALICACEAE Casearia decandra 8.244226
summary(cas.dec$dap)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 5.000 5.889 7.261 8.482 9.135 58.570
mean(cas.dec$dap)
## [1] 8.482273
sd(cas.dec$dap)
## [1] 5.472392
hist(cas.dec$dap)
cap<-c(37,52,18,21,75)
h<-c(21, 24, 10, 12, 30)
dap<-cap/pi
plot(dap, h, pch=20, xlab="DAP (cm) ", ylab="Altura (m)")
Salvando um gráfico
jpeg(filename = "plot1.jpg",
width = 2000, height = 2000, units = "px",
quality = 100, bg = "white", res = 300, family="times")
plot(dap, h, pch=20, xlab="DAP (cm) ", ylab="Altura (m)")
dev.off()
## quartz_off_screen
## 2
names(dados)
shapiro.test(dados$dap)
## [1] "parc" "Exp" "Family" "spp" "dap"
##
## Shapiro-Wilk normality test
##
## data: dados$dap
## W = 0.78648, p-value < 2.2e-16
wilcox.test(dap~Exp, data=dados)
aggregate(dap ~ Exp, dados, mean)
##
## Wilcoxon rank sum test with continuity correction
##
## data: dap by Exp
## W = 383600, p-value = 0.01404
## alternative hypothesis: true location shift is not equal to 0
##
## Exp dap
## 1 Norte 12.69118
## 2 Sul 13.46461
dap1<-c(17, 15, 18, 16, 16, 14, 14, 19, 12, 13,
11, 12, 11, 10, 14,9, 6, 9, 5, 8,
10, 11, 11, 5, 8, 5, 11, 11, 8, 17)
setores<-c(rep("baixada", 10), rep("encosta", 10), rep("topo",10))
setores
## [1] "baixada" "baixada" "baixada" "baixada" "baixada" "baixada" "baixada"
## [8] "baixada" "baixada" "baixada" "encosta" "encosta" "encosta" "encosta"
## [15] "encosta" "encosta" "encosta" "encosta" "encosta" "encosta" "topo"
## [22] "topo" "topo" "topo" "topo" "topo" "topo" "topo"
## [29] "topo" "topo"
resultado<-(aov(dap1~setores))
summary(resultado)
## Df Sum Sq Mean Sq F value Pr(>F)
## setores 2 224.5 112.23 13.71 7.77e-05 ***
## Residuals 27 221.0 8.19
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
boxplot(dap1 ~ setores)
TukeyHSD(resultado, conf.level = 0.95)
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = dap1 ~ setores)
##
## $setores
## diff lwr upr p adj
## encosta-baixada -5.9 -9.072334 -2.727666 0.0002482
## topo-baixada -5.7 -8.872334 -2.527666 0.0003761
## topo-encosta 0.2 -2.972334 3.372334 0.9866263
plot(TukeyHSD(resultado, conf.level = 0.95))
dinamica
chisq.test(dinamica)
## Warning in chisq.test(dinamica): Chi-squared approximation may be incorrect
chisq.test(dinamica) $exp
## Warning in chisq.test(dinamica): Chi-squared approximation may be incorrect
## P CEL CTS
## Aumentou 1 8 4
## Estável 2 22 5
## Reduziu 9 14 2
##
## Pearson's Chi-squared test
##
## data: dinamica
## X-squared = 10.86, df = 4, p-value = 0.02818
##
## P CEL CTS
## Aumentou 2.328358 8.537313 2.134328
## Estável 5.194030 19.044776 4.761194
## Reduziu 4.477612 16.417910 4.104478
fit1<-lm(h~dap)
fit1
##
## Call:
## lm(formula = h ~ dap)
##
## Coefficients:
## (Intercept) dap
## 5.348 1.087
summary(fit1)
##
## Call:
## lm(formula = h ~ dap)
##
## Residuals:
## 1 2 3 4 5
## 2.8460 0.6542 -1.5777 -0.6161 -1.3065
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.3476 2.0285 2.636 0.07791 .
## dap 1.0874 0.1393 7.805 0.00438 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.09 on 3 degrees of freedom
## Multiple R-squared: 0.9531, Adjusted R-squared: 0.9374
## F-statistic: 60.92 on 1 and 3 DF, p-value: 0.004378
fit1$coefficients
fit1$residuals
fit1$fitted.values
## (Intercept) dap
## 5.347560 1.087366
## 1 2 3 4 5
## 2.8460292 0.6542410 -1.5777057 -0.6160634 -1.3065010
## 1 2 3 4 5
## 18.15397 23.34576 11.57771 12.61606 31.30650
plot((cap)/pi, h, pch=20, xlab="DAP (cm) ", ylab="Altura (m)")
abline(fit1)
names(dados)
source("https://dl.dropboxusercontent.com/u/6511995/fito.R")
# ou source("fito.R") se o arquivo estiver no diretorio de trabalho
fitoR(dados, 200, "fitossociologia")
## [1] "parc" "Exp" "Family" "spp" "dap"
## N DA DR DoA DoR FA FR VI
## Araucaria angustifolia 125 125 6.78 5.27 14.35 68 4.05 8.40
## Lithraea brasiliensis 101 101 5.48 3.94 10.72 80 4.77 6.99
## Casearia decandra 149 149 8.08 1.19 3.24 86 5.13 5.48
## Jacaranda puberula 172 172 9.33 1.54 4.20 46 2.74 5.43
## Matayba elaeagnoides 84 84 4.56 2.21 6.01 38 2.26 4.28
## Podocarpus lambertii 69 69 3.74 1.48 4.03 64 3.81 3.86
## Sapium glandulosum 66 66 3.58 1.26 3.42 40 2.38 3.13
## Ocotea pulchella 34 34 1.84 1.60 4.36 52 3.10 3.10
## Myrsine umbellata 69 69 3.74 0.70 1.92 56 3.34 3.00
## Lamanonia ternata 37 37 2.01 1.67 4.55 40 2.38 2.98
## Casearia obliqua 55 55 2.98 0.92 2.49 48 2.86 2.78
## Cupania vernalis 55 55 2.98 0.69 1.87 56 3.34 2.73
## Dicksonia sellowiana 38 38 2.06 1.53 4.18 22 1.31 2.52
## Duranta vestita 51 51 2.77 0.32 0.88 56 3.34 2.33
## Dasyphyllum tomentosum 26 26 1.41 1.27 3.46 34 2.03 2.30
## Vernonanthura discolor 21 21 1.14 1.02 2.78 22 1.31 1.74
## Prunus myrtifolia 22 22 1.19 0.68 1.85 36 2.15 1.73
## Zanthoxylum rhoifolium 28 28 1.52 0.34 0.91 32 1.91 1.45
## Allophylus guaraniticus 32 32 1.74 0.22 0.60 30 1.79 1.37
## Solanum sanctaecatharinae 22 22 1.19 0.37 1.01 30 1.79 1.33
## Zanthoxylum kleinii 28 28 1.52 0.47 1.27 20 1.19 1.33
## Ilex theezans 21 21 1.14 0.38 1.04 28 1.67 1.28
## Cinnamomum amoenum 12 12 0.65 0.68 1.85 20 1.19 1.23
## Banara tomentosa 24 24 1.30 0.11 0.31 34 2.03 1.21
## Eugenia pluriflora 23 23 1.25 0.20 0.55 30 1.79 1.20
## Drimys brasiliensis 22 22 1.19 0.12 0.32 34 2.03 1.18
## Myrcia guianensis 23 23 1.25 0.20 0.55 28 1.67 1.15
## Calyptranthes concinna 30 30 1.63 0.22 0.60 20 1.19 1.14
## Myrsine coriacea 16 16 0.87 0.35 0.94 26 1.55 1.12
## Machaerium paraguariense 18 18 0.98 0.35 0.95 22 1.31 1.08
## Xylosma ciliatifolia 22 22 1.19 0.16 0.44 26 1.55 1.06
## Myrcia hatschbachii 18 18 0.98 0.28 0.75 20 1.19 0.97
## Blepharocalyx salicifolius 19 19 1.03 0.14 0.38 24 1.43 0.95
## Dasyphyllum spinescens 8 8 0.43 0.51 1.40 14 0.83 0.89
## Annona rugulosa 17 17 0.92 0.11 0.31 24 1.43 0.89
## Gochnatia polymorpha 11 11 0.60 0.38 1.02 14 0.83 0.82
## Roupala montana 14 14 0.76 0.22 0.61 18 1.07 0.81
## Myrcia palustris 16 16 0.87 0.12 0.34 20 1.19 0.80
## Sebastiania commersoniana 17 17 0.92 0.27 0.74 10 0.60 0.75
## Symplocos uniflora 12 12 0.65 0.15 0.42 18 1.07 0.71
## Schinus terebinthifolius 20 20 1.09 0.15 0.42 8 0.48 0.66
## Campomanesia xanthocarpa 8 8 0.43 0.21 0.58 14 0.83 0.62
## Dalbergia frutescens 11 11 0.60 0.11 0.31 14 0.83 0.58
## Oreopanax fulvus 10 10 0.54 0.10 0.27 14 0.83 0.55
## Nectandra megapotamica 7 7 0.38 0.15 0.41 14 0.83 0.54
## Celtis iguanaea 12 12 0.65 0.11 0.30 10 0.60 0.52
## Scutia buxifolia 8 8 0.43 0.14 0.37 12 0.72 0.51
## Inga sessilis 14 14 0.76 0.19 0.51 4 0.24 0.50
## Styrax leprosus 8 8 0.43 0.13 0.36 12 0.72 0.50
## Ocotea puberula 4 4 0.22 0.26 0.70 8 0.48 0.46
## Myrcia laruotteana 7 7 0.38 0.06 0.17 14 0.83 0.46
## Cedrela fissilis 9 9 0.49 0.15 0.41 8 0.48 0.46
## Allophylus edulis 7 7 0.38 0.05 0.13 12 0.72 0.41
## Sebastiania brasiliensis 9 9 0.49 0.07 0.19 8 0.48 0.39
## Clethra scabra 6 6 0.33 0.11 0.29 8 0.48 0.37
## Coutarea hexandra 5 5 0.27 0.07 0.18 10 0.60 0.35
## Eugenia pyriformis 5 5 0.27 0.06 0.17 10 0.60 0.35
## Erythroxylum deciduum 5 5 0.27 0.10 0.27 8 0.48 0.34
## Ilex dumosa 6 6 0.33 0.04 0.12 8 0.48 0.31
## Escallonia bifida 6 6 0.33 0.08 0.23 6 0.36 0.30
## Maytenus dasyclada 4 4 0.22 0.06 0.16 8 0.48 0.28
## Ilex brevicuspis 5 5 0.27 0.11 0.30 4 0.24 0.27
## Xylosma tweediana 4 4 0.22 0.01 0.03 8 0.48 0.24
## Myrrhinium atropurpureum 3 3 0.16 0.03 0.09 6 0.36 0.20
## Solanum pabstii 3 3 0.16 0.02 0.04 6 0.36 0.19
## Nectandra lanceolata 2 2 0.11 0.06 0.16 4 0.24 0.17
## NI 3 3 0.16 0.04 0.11 4 0.24 0.17
## Ilex microdonta 2 2 0.11 0.03 0.09 4 0.24 0.15
## Eugenia uniflora 2 2 0.11 0.03 0.08 4 0.24 0.14
## Myrcia multiflora 1 1 0.05 0.08 0.21 2 0.12 0.13
## Mimosa scabrella 1 1 0.05 0.06 0.17 2 0.12 0.11
## Handroanthus albus 1 1 0.05 0.03 0.09 2 0.12 0.09
## Machaerium stipitatum 1 1 0.05 0.03 0.09 2 0.12 0.09
## Ocotea diospyrifolia 1 1 0.05 0.03 0.08 2 0.12 0.08
## Lauraceae 1 1 1 0.05 0.03 0.07 2 0.12 0.08
## Piptocarpha angustifolia 1 1 0.05 0.02 0.06 2 0.12 0.08
## Maytenus boaria 1 1 0.05 0.01 0.03 2 0.12 0.07
## Myrtaceae sp. 1 1 0.05 0.01 0.02 2 0.12 0.06
## Myrsine sp. 1 1 0.05 0.01 0.02 2 0.12 0.06
## Myrceugenia myrcioides 1 1 0.05 0.01 0.02 2 0.12 0.06
## Quillaja brasiliensis 1 1 0.05 0.00 0.01 2 0.12 0.06
## Citronella paniculata 1 1 0.05 0.00 0.01 2 0.12 0.06
## Ilex paraguariensis 1 1 0.05 0.00 0.01 2 0.12 0.06
## Acca sellowiana 1 1 0.05 0.00 0.01 2 0.12 0.06
## Myrceugenia euosma 1 1 0.05 0.00 0.01 2 0.12 0.06
## Myrciaria 1 1 0.05 0.00 0.01 2 0.12 0.06
## Myrceugenia oxysepala 1 1 0.05 0.00 0.01 2 0.12 0.06
## Eugenia uruguayensis 1 1 0.05 0.00 0.01 2 0.12 0.06
## Rhamnus sphaerosperma 1 1 0.05 0.00 0.01 2 0.12 0.06
## Myrcianthes gigantea 1 1 0.05 0.00 0.01 2 0.12 0.06
## Densidade total por área = 1843 ± 616.61 ind/ha
## Área basal total por área = 36.72 ± 12.86 m2/ha
## Riqueza = 90 esp.
## Índice de Shannon-Wiener (H') = 3.744051
## Equabilidade de Pielou (J) = 0.8320464
library(vegan)
## Loading required package: permute
## Loading required package: lattice
## This is vegan 2.4-1
?specaccum
matriz.parc<-table(dados$parc, dados$spp)
curva.random<- specaccum(matriz.parc, method= "random", permutations=1000)
curva.random
## Species Accumulation Curve
## Accumulation method: random, with 1000 permutations
## Call: specaccum(comm = matriz.parc, method = "random", permutations = 1000)
##
##
## Sites 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000
## Richness 16.58900 27.28700 35.10900 40.93700 45.70800 49.49500 52.68300
## sd 3.74621 4.24437 4.44172 4.45925 4.30968 4.30982 4.18832
##
## Sites 8.0000 9.00000 10.00000 11.00000 12.00000 13.00000 14.00000
## Richness 55.4450 57.86500 60.01100 61.95500 63.58000 65.10600 66.49000
## sd 4.0902 3.96112 3.83974 3.69955 3.58754 3.50986 3.41197
##
## Sites 15.00000 16.0000 17.00000 18.00000 19.00000 20.00000 21.00000
## Richness 67.77500 68.9760 70.06600 71.11000 72.18200 73.16300 74.02200
## sd 3.34957 3.2961 3.16127 3.12276 3.02093 2.99991 2.95639
##
## Sites 22.00000 23.00000 24.00000 25.00000 26.00000 27.00000 28.00000
## Richness 74.86200 75.66600 76.39100 77.14700 77.81800 78.53800 79.15400
## sd 2.85817 2.80148 2.68726 2.59386 2.49782 2.47885 2.44832
##
## Sites 29.00000 30.00000 31.00000 32.00000 33.00000 34.00000 35.00000
## Richness 79.73700 80.34600 80.88500 81.45300 82.00800 82.52300 83.04100
## sd 2.36758 2.28988 2.22052 2.17452 2.08141 2.01035 1.93263
##
## Sites 36.0000 37.00000 38.00000 39.00000 40.00000 41.00000 42.00000
## Richness 83.5670 84.08800 84.54900 85.02900 85.51500 85.97500 86.46000
## sd 1.9332 1.86111 1.78852 1.71438 1.63904 1.56039 1.47668
##
## Sites 43.00000 44.00000 45.00000 46.0000 47.0000 48.00000 49.00000 50
## Richness 86.88400 87.34200 87.78500 88.2330 88.6400 89.09800 89.55800 90
## sd 1.38869 1.30412 1.20176 1.0779 0.9866 0.81919 0.57005 0
curva.rare<- specaccum(matriz.parc, method= "rarefaction")
curva.rare
## Species Accumulation Curve
## Accumulation method: rarefaction
## Call: specaccum(comm = matriz.parc, method = "rarefaction")
##
##
## Sites 1.0038 2.0076 3.0114 3.9881 4.9919 5.9957 6.9995
## Individuals 37.0000 74.0000 111.0000 147.0000 184.0000 221.0000 258.0000
## Richness 23.0625 34.6454 42.2657 47.6584 51.9112 55.2872 58.0491
## sd 2.3523 2.9112 3.0775 3.1125 3.0984 3.0649 3.0251
##
## Sites 8.0033 9.0071 10.0109 10.9875 11.9913 12.9951 13.9989
## Individuals 295.0000 332.0000 369.0000 405.0000 442.0000 479.0000 516.0000
## Richness 60.3653 62.3488 64.0774 65.5674 66.9411 68.1846 69.3209
## sd 2.9847 2.9458 2.9092 2.8760 2.8444 2.8149 2.7875
##
## Sites 15.0027 16.0065 17.0103 17.9870 18.9908 19.9946 20.9984
## Individuals 553.0000 590.0000 627.0000 663.0000 700.0000 737.0000 774.0000
## Richness 70.3675 71.3385 72.2449 73.0736 73.8778 74.6400 75.3657
## sd 2.7617 2.7372 2.7139 2.6918 2.6697 2.6477 2.6255
##
## Sites 22.0022 23.0060 24.0098 25.0136 25.9902 26.9940
## Individuals 811.0000 848.0000 885.0000 922.0000 958.0000 995.0000
## Richness 76.0591 76.7240 77.3639 77.9814 78.5630 79.1433
## sd 2.6030 2.5799 2.5558 2.5306 2.5048 2.4767
##
## Sites 27.9978 29.0016 30.0054 31.0092 32.0130 32.9897
## Individuals 1032.0000 1069.0000 1106.0000 1143.0000 1180.0000 1216.0000
## Richness 79.7075 80.2574 80.7944 81.3197 81.8345 82.3261
## sd 2.4468 2.4149 2.3808 2.3442 2.3049 2.2638
##
## Sites 33.9935 34.9973 36.0011 37.0049 38.0087 39.0125
## Individuals 1253.0000 1290.0000 1327.0000 1364.0000 1401.0000 1438.0000
## Richness 82.8228 83.3115 83.7930 84.2678 84.7365 85.1997
## sd 2.2185 2.1696 2.1169 2.0600 1.9985 1.9318
##
## Sites 39.9891 40.9929 41.9967 43.0005 44.0043 45.0081
## Individuals 1474.0000 1511.0000 1548.0000 1585.0000 1622.0000 1659.0000
## Richness 85.6453 86.0985 86.5474 86.9921 87.4330 87.8704
## sd 1.8615 1.7827 1.6965 1.6015 1.4961 1.3777
##
## Sites 46.0119 46.9886 47.9924 48.9962 50
## Individuals 1696.0000 1732.0000 1769.0000 1806.0000 1843
## Richness 88.3044 88.7237 89.1518 89.5772 90
## sd 1.2427 1.0893 0.8974 0.6401 0
plot(curva.random,xvar="sites", ci.type = c("polygon"), col="gray")
boxplot(curva.random, col="gray", add=TRUE, pch="+")
plot(curva.rare,xvar="individuals")
specnumber(matriz.parc, MARGIN=1)
## 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
## 20 17 16 16 17 13 18 19 15 22 18 16 17 22 24 20 20 11 19 15 15 10 14 21 18
## 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
## 11 19 17 12 17 16 17 18 12 15 14 27 18 15 25 25 11 15 11 16 16 15 12 20 12
matriz.setor<-table(dados$Exp, dados$spp)
specnumber(matriz.setor, MARGIN=1)
## Norte Sul
## 64 80
Podemos fazer uma comparação direta da riqueza entre setores?
Verificar a intensidade amostral dos setores
apply(matriz.setor,1, sum) # numero de indivíduos por setor
## Norte Sul
## 758 1085
rarefy(matriz.setor,758, se=TRUE)
##
## Norte Sul
## S 64 74.457655
## se 0 2.000529
## attr(,"Subsample")
## [1] 758
rarecurve (matriz.setor, sample = 758, cex = 0.6)
pool.total <- specpool(matriz.parc)
pool.total
## Species chao chao.se jack1 jack1.se jack2 boot boot.se n
## All 90 126.015 22.34408 110.58 4.907993 125.0976 98.73161 2.603992 50
exposicao<-c(rep("Norte", 17), rep("Sul", 33))
pool.setor <- specpool(matriz.parc, exposicao)
pool.setor
## Species chao chao.se jack1 jack1.se jack2 boot
## Norte 64 87.52941 14.263948 82.82353 5.887057 93.85294 72.35159
## Sul 80 90.34343 6.782746 95.51515 4.121212 99.62500 87.67624
## boot.se n
## Norte 3.066097 17
## Sul 2.674139 33
H<-diversity(matriz.setor, index="shannon")
H
## Norte Sul
## 3.312685 3.773019
J.norte <-H[1]/log(64)
J.norte
J.sul <-H[2]/log(80)
J.sul
## Norte
## 0.7965323
## Sul
## 0.8610216
?vegdist
Atentar para os argumentos method e binary
Bray-Curtis
vegdist(matriz.setor, method="bray", binary=F)
## Norte
## Sul 0.4313619
## Norte
## Sul 0.25
dist<-vegdist(matriz.setor, method="jaccard", binary=T)
vegdist(matriz.setor, method="euclidean", binary=F)
## Norte
## Sul 152.4041
Além da definição da medida de distância, é necessário escolher um método de ligação
dist.bray<-vegdist(matriz.parc, method="bray", binary=F)
agrupamento<-hclust(dist.bray, method="average")
plot(agrupamento, hang=-1)
dist.ward<-vegdist(matriz.parc, method="euclidean", binary=F)
agrupamento<-hclust(dist.ward, method="ward.D2")
plot(agrupamento, hang=-1)
apply(matriz.parc, 2, sum)
## Acca sellowiana Allophylus edulis
## 1 7
## Allophylus guaraniticus Annona rugulosa
## 32 17
## Araucaria angustifolia Banara tomentosa
## 125 24
## Blepharocalyx salicifolius Calyptranthes concinna
## 19 30
## Campomanesia xanthocarpa Casearia decandra
## 8 149
## Casearia obliqua Cedrela fissilis
## 55 9
## Celtis iguanaea Cinnamomum amoenum
## 12 12
## Citronella paniculata Clethra scabra
## 1 6
## Coutarea hexandra Cupania vernalis
## 5 55
## Dalbergia frutescens Dasyphyllum spinescens
## 11 8
## Dasyphyllum tomentosum Dicksonia sellowiana
## 26 38
## Drimys brasiliensis Duranta vestita
## 22 51
## Erythroxylum deciduum Escallonia bifida
## 5 6
## Eugenia pluriflora Eugenia pyriformis
## 23 5
## Eugenia uniflora Eugenia uruguayensis
## 2 1
## Gochnatia polymorpha Handroanthus albus
## 11 1
## Ilex brevicuspis Ilex dumosa
## 5 6
## Ilex microdonta Ilex paraguariensis
## 2 1
## Ilex theezans Inga sessilis
## 21 14
## Jacaranda puberula Lamanonia ternata
## 172 37
## Lauraceae 1 Lithraea brasiliensis
## 1 101
## Machaerium paraguariense Machaerium stipitatum
## 18 1
## Matayba elaeagnoides Maytenus boaria
## 84 1
## Maytenus dasyclada Mimosa scabrella
## 4 1
## Myrceugenia euosma Myrceugenia myrcioides
## 1 1
## Myrceugenia oxysepala Myrcia guianensis
## 1 23
## Myrcia hatschbachii Myrcia laruotteana
## 18 7
## Myrcia multiflora Myrcia palustris
## 1 16
## Myrcianthes gigantea Myrciaria
## 1 1
## Myrrhinium atropurpureum Myrsine coriacea
## 3 16
## Myrsine sp. Myrsine umbellata
## 1 69
## Myrtaceae sp. Nectandra lanceolata
## 1 2
## Nectandra megapotamica NI
## 7 3
## Ocotea diospyrifolia Ocotea puberula
## 1 4
## Ocotea pulchella Oreopanax fulvus
## 34 10
## Piptocarpha angustifolia Podocarpus lambertii
## 1 69
## Prunus myrtifolia Quillaja brasiliensis
## 22 1
## Rhamnus sphaerosperma Roupala montana
## 1 14
## Sapium glandulosum Schinus terebinthifolius
## 66 20
## Scutia buxifolia Sebastiania brasiliensis
## 8 9
## Sebastiania commersoniana Solanum pabstii
## 17 3
## Solanum sanctaecatharinae Styrax leprosus
## 22 8
## Symplocos uniflora Vernonanthura discolor
## 12 21
## Xylosma ciliatifolia Xylosma tweediana
## 22 4
## Zanthoxylum kleinii Zanthoxylum rhoifolium
## 28 28
apply(matriz.parc, 2, sum)>10
## Acca sellowiana Allophylus edulis
## FALSE FALSE
## Allophylus guaraniticus Annona rugulosa
## TRUE TRUE
## Araucaria angustifolia Banara tomentosa
## TRUE TRUE
## Blepharocalyx salicifolius Calyptranthes concinna
## TRUE TRUE
## Campomanesia xanthocarpa Casearia decandra
## FALSE TRUE
## Casearia obliqua Cedrela fissilis
## TRUE FALSE
## Celtis iguanaea Cinnamomum amoenum
## TRUE TRUE
## Citronella paniculata Clethra scabra
## FALSE FALSE
## Coutarea hexandra Cupania vernalis
## FALSE TRUE
## Dalbergia frutescens Dasyphyllum spinescens
## TRUE FALSE
## Dasyphyllum tomentosum Dicksonia sellowiana
## TRUE TRUE
## Drimys brasiliensis Duranta vestita
## TRUE TRUE
## Erythroxylum deciduum Escallonia bifida
## FALSE FALSE
## Eugenia pluriflora Eugenia pyriformis
## TRUE FALSE
## Eugenia uniflora Eugenia uruguayensis
## FALSE FALSE
## Gochnatia polymorpha Handroanthus albus
## TRUE FALSE
## Ilex brevicuspis Ilex dumosa
## FALSE FALSE
## Ilex microdonta Ilex paraguariensis
## FALSE FALSE
## Ilex theezans Inga sessilis
## TRUE TRUE
## Jacaranda puberula Lamanonia ternata
## TRUE TRUE
## Lauraceae 1 Lithraea brasiliensis
## FALSE TRUE
## Machaerium paraguariense Machaerium stipitatum
## TRUE FALSE
## Matayba elaeagnoides Maytenus boaria
## TRUE FALSE
## Maytenus dasyclada Mimosa scabrella
## FALSE FALSE
## Myrceugenia euosma Myrceugenia myrcioides
## FALSE FALSE
## Myrceugenia oxysepala Myrcia guianensis
## FALSE TRUE
## Myrcia hatschbachii Myrcia laruotteana
## TRUE FALSE
## Myrcia multiflora Myrcia palustris
## FALSE TRUE
## Myrcianthes gigantea Myrciaria
## FALSE FALSE
## Myrrhinium atropurpureum Myrsine coriacea
## FALSE TRUE
## Myrsine sp. Myrsine umbellata
## FALSE TRUE
## Myrtaceae sp. Nectandra lanceolata
## FALSE FALSE
## Nectandra megapotamica NI
## FALSE FALSE
## Ocotea diospyrifolia Ocotea puberula
## FALSE FALSE
## Ocotea pulchella Oreopanax fulvus
## TRUE FALSE
## Piptocarpha angustifolia Podocarpus lambertii
## FALSE TRUE
## Prunus myrtifolia Quillaja brasiliensis
## TRUE FALSE
## Rhamnus sphaerosperma Roupala montana
## FALSE TRUE
## Sapium glandulosum Schinus terebinthifolius
## TRUE TRUE
## Scutia buxifolia Sebastiania brasiliensis
## FALSE FALSE
## Sebastiania commersoniana Solanum pabstii
## TRUE FALSE
## Solanum sanctaecatharinae Styrax leprosus
## TRUE FALSE
## Symplocos uniflora Vernonanthura discolor
## TRUE TRUE
## Xylosma ciliatifolia Xylosma tweediana
## TRUE FALSE
## Zanthoxylum kleinii Zanthoxylum rhoifolium
## TRUE TRUE
* Matriz com as espécies com mais do qe 10 indvíduos
matriz.parc.10<-matriz.parc[,apply(matriz.parc, 2, sum)>10]
y <- dispindmorisita(matriz.parc.10, unique.rm = TRUE)
y
## imor mclu muni imst
## Allophylus guaraniticus 2.8225806 1.684594 0.43725537 0.51177664
## Annona rugulosa 2.9411765 2.326401 -0.09031772 0.50644776
## Araucaria angustifolia 1.9870968 1.171148 0.85931384 0.50835519
## Banara tomentosa 1.6304348 1.922714 0.24151811 0.34161996
## Blepharocalyx salicifolius 3.2163743 2.179023 0.03082869 0.51084620
## Calyptranthes concinna 6.4367816 1.731807 0.39844540 0.54873783
## Casearia decandra 1.1699619 1.143395 0.88212781 0.50027189
## Casearia obliqua 3.0976431 1.393008 0.67694290 0.51753488
## Celtis iguanaea 16.6666667 2.929310 -0.58591669 0.64592262
## Cinnamomum amoenum 1.5151515 2.929310 -0.58591669 0.13350665
## Cupania vernalis 2.4915825 1.393008 0.67694290 0.51130058
## Dalbergia frutescens 6.3636364 3.122241 -0.74450835 0.53457285
## Dasyphyllum tomentosum 2.1538462 1.848897 0.30219666 0.50316659
## Dicksonia sellowiana 7.3968706 1.573579 0.52851126 0.56012515
## Drimys brasiliensis 1.2987013 2.010591 0.16928174 0.14778544
## Duranta vestita 1.7647059 1.424448 0.65109833 0.50350235
## Eugenia pluriflora 2.3715415 1.964655 0.20704166 0.50423528
## Gochnatia polymorpha 4.5454545 3.122241 -0.74450835 0.51518005
## Ilex theezans 2.6190476 2.061121 0.12774582 0.50581915
## Inga sessilis 28.0219780 2.632493 -0.34192950 0.76800529
## Jacaranda puberula 4.7905617 1.124108 0.89798197 0.53750780
## Lamanonia ternata 2.4774775 1.589511 0.51541435 0.50917121
## Lithraea brasiliensis 1.5346535 1.212224 0.82554916 0.50330441
## Machaerium paraguariense 5.5555556 2.248377 -0.02618138 0.53462896
## Matayba elaeagnoides 4.2885829 1.255692 0.78981827 0.53111021
## Myrcia guianensis 2.7667984 1.964655 0.20704166 0.50834951
## Myrcia hatschbachii 3.9215686 2.248377 -0.02618138 0.51751973
## Myrcia palustris 3.3333333 2.414828 -0.16300557 0.50965118
## Myrsine coriacea 1.6666667 2.414828 -0.16300557 0.23559997
## Myrsine umbellata 2.0460358 1.312094 0.74345465 0.50753721
## Ocotea pulchella 0.9803922 1.643103 0.47136110 -0.01854559
## Podocarpus lambertii 1.4705882 1.312094 0.74345465 0.50162765
## Prunus myrtifolia 1.5151515 2.010591 0.16928174 0.25487633
## Roupala montana 3.2967033 2.632493 -0.34192950 0.50701124
## Sapium glandulosum 3.1934732 1.326499 0.73161410 0.51917855
## Schinus terebinthifolius 35.7894737 2.116969 0.08183771 0.85161208
## Sebastiania commersoniana 18.0147059 2.326401 -0.09031772 0.66453871
## Solanum sanctaecatharinae 2.1645022 2.010591 0.16928174 0.50160359
## Symplocos uniflora 2.2727273 2.929310 -0.58591669 0.32983996
## Vernonanthura discolor 3.5714286 2.061121 0.12774582 0.51575243
## Xylosma ciliatifolia 2.5974026 2.010591 0.16928174 0.50611397
## Zanthoxylum kleinii 5.1587302 1.786015 0.35388579 0.53497652
## Zanthoxylum rhoifolium 2.3809524 1.786015 0.35388579 0.50616976
## pchisq
## Allophylus guaraniticus 5.109267e-06
## Annona rugulosa 3.357340e-03
## Araucaria angustifolia 1.747199e-15
## Banara tomentosa 7.973246e-02
## Blepharocalyx salicifolius 4.247673e-04
## Calyptranthes concinna 2.935773e-21
## Casearia decandra 1.167383e-02
## Casearia obliqua 4.728755e-14
## Celtis iguanaea 9.429680e-24
## Cinnamomum amoenum 2.681175e-01
## Cupania vernalis 3.366007e-09
## Dalbergia frutescens 1.143292e-05
## Dasyphyllum tomentosum 5.429438e-03
## Dicksonia sellowiana 3.807201e-35
## Drimys brasiliensis 2.497814e-01
## Duranta vestita 6.369685e-04
## Eugenia pluriflora 4.076704e-03
## Gochnatia polymorpha 1.234802e-03
## Ilex theezans 2.500485e-03
## Inga sessilis 1.300579e-56
## Jacaranda puberula 1.915754e-115
## Lamanonia ternata 1.294590e-05
## Lithraea brasiliensis 1.199004e-05
## Machaerium paraguariense 9.097079e-09
## Matayba elaeagnoides 8.231758e-42
## Myrcia guianensis 5.460601e-04
## Myrcia hatschbachii 3.395690e-05
## Myrcia palustris 1.373030e-03
## Myrsine coriacea 1.550663e-01
## Myrsine umbellata 6.605116e-08
## Ocotea pulchella 4.992701e-01
## Podocarpus lambertii 2.723578e-03
## Prunus myrtifolia 1.383804e-01
## Roupala montana 4.367426e-03
## Sapium glandulosum 9.564804e-19
## Schinus terebinthifolius 4.843279e-118
## Sebastiania commersoniana 1.118438e-41
## Solanum sanctaecatharinae 1.342437e-02
## Symplocos uniflora 8.624581e-02
## Vernonanthura discolor 2.103234e-05
## Xylosma ciliatifolia 1.920311e-03
## Zanthoxylum kleinii 6.727342e-14
## Zanthoxylum rhoifolium 8.004724e-04
#install.packages("labdsv")
library("labdsv")
esp.ind<-indval(as.data.frame.matrix(matriz.parc.10),as.vector(exposicao))
summary(esp.ind)
## cluster indicator_value probability
## Eugenia pluriflora 1 0.7289 0.001
## Araucaria angustifolia 1 0.6379 0.003
## Jacaranda puberula 1 0.6052 0.001
## Drimys brasiliensis 1 0.5916 0.001
## Calyptranthes concinna 1 0.5882 0.001
## Casearia decandra 1 0.5833 0.030
## Myrsine umbellata 1 0.5831 0.002
## Zanthoxylum kleinii 1 0.5195 0.001
## Podocarpus lambertii 1 0.5097 0.025
## Solanum sanctaecatharinae 1 0.3636 0.022
## Gochnatia polymorpha 1 0.3357 0.003
## Sapium glandulosum 2 0.4314 0.019
## Zanthoxylum rhoifolium 2 0.3691 0.027
## Dicksonia sellowiana 2 0.3333 0.023
##
## Sum of probabilities = 15.286
##
## Sum of Indicator Values = 13.35
##
## Sum of Significant Indicator Values = 7.18
##
## Number of Significant Indicators = 14
##
## Significant Indicator Distribution
##
## 1 2
## 11 3
Ferramenta para reconhecimento de padrões
Explorando dados ambientais
dim (amb)
names(amb)
summary(amb)
amb.pca<-rda(amb, scale=T)
summary(amb.pca)
##
## Call:
## rda(X = amb, scale = T)
##
## Partitioning of correlations:
## Inertia Proportion
## Total 18 1
## Unconstrained 18 1
##
## Eigenvalues, and their contribution to the correlations
##
## Importance of components:
## PC1 PC2 PC3 PC4 PC5 PC6
## Eigenvalue 8.8268 2.1053 1.47089 1.21485 1.13823 0.79450
## Proportion Explained 0.4904 0.1170 0.08172 0.06749 0.06323 0.04414
## Cumulative Proportion 0.4904 0.6073 0.68905 0.75654 0.81978 0.86392
## PC7 PC8 PC9 PC10 PC11 PC12
## Eigenvalue 0.69897 0.48973 0.42928 0.30179 0.23173 0.16454
## Proportion Explained 0.03883 0.02721 0.02385 0.01677 0.01287 0.00914
## Cumulative Proportion 0.90275 0.92996 0.95381 0.97057 0.98345 0.99259
## PC13 PC14 PC15
## Eigenvalue 0.08066 0.04396 0.008824
## Proportion Explained 0.00448 0.00244 0.000490
## Cumulative Proportion 0.99707 0.99951 1.000000
##
## Scaling 2 for species and site scores
## * Species are scaled proportional to eigenvalues
## * Sites are unscaled: weighted dispersion equal on all dimensions
## * General scaling constant of scores: 5.449632
##
##
## Species scores
##
## PC1 PC2 PC3 PC4 PC5 PC6
## arg -0.2415 -0.243726 -0.61642 -0.93366 -0.23462 0.27546
## ph 1.2063 0.120044 -0.13306 -0.08120 0.06712 -0.10549
## P 0.6868 -0.534307 -0.23192 -0.14070 -0.05421 0.62402
## K 0.6857 0.370407 -0.05829 -0.05568 0.72755 0.33868
## Na 0.8050 -0.249722 0.21765 -0.36965 -0.05084 -0.68786
## MO 0.6819 -0.659944 0.14244 0.12477 -0.63611 0.06970
## hal -1.1726 -0.357639 -0.14457 -0.01769 0.24199 -0.04616
## Al -1.0782 -0.130639 -0.32686 0.02056 0.05770 -0.25638
## Ca 1.0194 -0.387144 0.48975 0.17053 0.26978 0.13673
## Mg 0.9150 -0.515201 -0.24395 -0.22580 -0.17668 -0.21666
## CTCph7 -0.6621 -0.929702 0.05363 0.01849 0.52453 -0.02264
## CTCef -0.9615 -0.722142 -0.11014 0.02252 0.40017 -0.13252
## V 1.2511 -0.026752 0.13824 0.01822 0.06677 0.01076
## SB 1.1238 -0.445070 0.28497 0.04778 0.18798 0.04795
## cd -0.8865 0.168676 0.02078 0.31602 -0.25107 0.19016
## cotmedia -0.5742 -0.546073 0.17972 0.52136 -0.39358 0.15143
## desmax 0.7781 -0.086668 -0.80883 0.52985 -0.02268 -0.08816
## decmed 0.8180 -0.008116 -0.82156 0.46291 0.13976 -0.14450
##
##
## Site scores (weighted sums of species scores)
##
## PC1 PC2 PC3 PC4 PC5 PC6
## 1 -1.66327 -0.02792 -1.16446 -0.37252 0.646962 -1.02249
## 2 -0.99424 0.09757 -0.47235 0.17616 -0.041248 -0.48256
## 3 0.05129 -0.01909 0.77335 0.47820 -0.288871 0.64742
## 4 -1.62041 -0.93054 -0.34880 -0.10487 1.066213 -0.83574
## 5 -0.37980 0.20392 0.71619 0.49832 -0.123916 0.29290
## 6 0.26439 -0.51989 1.44843 0.42491 0.315730 0.35409
## 7 0.31237 -0.44804 1.31383 0.48432 0.235213 0.09818
## 8 -0.14761 0.15368 1.17712 0.59626 -0.082255 -0.78996
## 9 -1.06982 0.42656 -0.08967 -0.19907 -0.483676 -0.26290
## 10 -1.25665 0.36500 -0.76810 -1.19561 -0.349475 -0.20276
## 11 -0.34678 1.19636 -0.33424 -0.23672 -1.702831 0.27325
## 12 -0.24617 0.25802 -0.59060 0.99324 -0.688886 -0.19331
## 13 -0.14335 0.80187 -0.11434 -0.49371 -0.160703 -0.03167
## 14 -0.24758 -0.72102 0.10229 -0.54485 0.603770 0.05286
## 15 -0.36821 1.00738 -0.43001 -0.12467 -1.262976 0.57496
## 16 -0.94017 -0.27270 -0.66430 -0.03402 0.455160 -0.52404
## 17 0.24792 0.16699 0.51345 0.37312 0.137440 0.89975
## 18 -0.82473 -0.85432 0.44519 -0.06820 -0.700002 0.99987
## 19 -0.29982 -1.18314 0.35188 2.18371 -0.385066 -0.22783
## 20 -1.40695 -0.38943 -0.85724 0.96718 0.143737 -0.81069
## 21 -0.16251 0.39539 0.44913 1.51047 -0.939136 0.15812
## 22 0.71013 -1.19488 -0.03408 0.46999 -0.530523 0.54304
## 23 1.44978 -1.61758 0.47697 -0.15304 0.515726 -0.91473
## 24 0.33532 -0.68049 0.27773 -0.56959 -0.406943 -0.21474
## 25 0.35509 -1.17601 0.28517 -1.30899 -0.041913 0.75309
## 26 -0.47814 -0.26489 0.30354 -0.69511 -0.242876 0.80441
## 27 -0.07808 -0.40963 0.29224 -0.83906 -0.312402 1.28881
## 28 -0.49828 1.04624 -0.15756 -0.64334 -0.537544 0.71116
## 29 -0.94661 -1.01113 -0.77776 -0.87573 1.197117 0.74488
## 30 0.36259 1.11508 1.51742 0.63519 -0.198276 -0.62042
## 31 -0.11946 0.49193 0.61354 0.37228 0.272812 0.45660
## 32 -0.36848 -0.08644 0.36849 -0.05599 0.549167 -0.37684
## 33 0.39074 0.36672 -0.15212 0.85963 0.193988 0.44118
## 34 -0.22190 0.28937 0.93321 -0.08953 0.485077 0.28442
## 35 -0.22047 0.07618 1.23439 0.26175 1.035379 0.71099
## 36 0.61179 -0.41057 1.35380 -1.15807 0.156673 -1.95644
## 37 -0.22773 -0.40510 -0.58103 0.41236 0.635637 0.62514
## 38 0.13306 -0.65749 -0.15206 -0.82289 0.415861 -0.22236
## 39 -0.08562 0.42294 0.17896 -0.19334 -0.027633 0.48715
## 40 0.78941 1.15205 -0.19569 -0.36869 0.122711 0.29602
## 41 0.68842 1.19852 -0.46326 0.16470 0.135935 -1.23881
## 42 0.88612 2.28423 -0.39509 0.09470 3.488473 0.77132
## 43 0.24762 1.07609 -0.16870 -0.45954 -1.140394 0.60782
## 44 0.74628 0.42047 0.09715 -1.61812 -1.008378 -1.06608
## 45 1.64164 -0.08347 -0.96451 -0.62084 0.411489 -0.46992
## 46 1.25118 -0.57012 -1.19730 0.11311 -0.078978 -0.31414
## 47 1.50923 -1.05080 -1.97550 0.11948 -0.407121 2.04597
## 48 0.72591 0.06633 -1.72614 2.24212 -0.009111 -0.95500
## 49 0.83529 -0.25668 -0.20708 0.04120 -0.467749 -0.64277
## 50 0.81723 0.16246 -0.24147 -0.62630 -0.601388 -1.54721
Verificar quantos componentes principais explicam de forma significativa a variação total dos dados
screeplot(amb.pca, bstick = TRUE, type = "lines")
Plotagem da PCA
biplot(amb.pca, display="species",
scalling=3, col="black", xlim=c(-2,2), ylim=c(-2,2))
points(amb.pca, "sites", pch=19, cex=1.2, col="black", bg="black",
select=exposicao=="Norte")
points(amb.pca, "sites", pch=1, col="black", bg="black",cex=1.2,
select=exposicao=="Sul")
legend(x = "topleft",
legend = c("Norte", "Sul"),
pch = c(19,1))
eixosPCA<-scores(amb.pca, choices = 1:2, display = "sites")
PCA1<-eixosPCA[,1]
PCA1
## 1 2 3 4 5 6
## -1.66327341 -0.99423747 0.05129339 -1.62040732 -0.37979635 0.26439320
## 7 8 9 10 11 12
## 0.31236821 -0.14760607 -1.06981556 -1.25664504 -0.34677992 -0.24616890
## 13 14 15 16 17 18
## -0.14335041 -0.24758077 -0.36821037 -0.94017340 0.24792304 -0.82472726
## 19 20 21 22 23 24
## -0.29982374 -1.40695375 -0.16250645 0.71012951 1.44978386 0.33532329
## 25 26 27 28 29 30
## 0.35509079 -0.47814414 -0.07807768 -0.49828137 -0.94661166 0.36259261
## 31 32 33 34 35 36
## -0.11946132 -0.36847863 0.39074326 -0.22189503 -0.22047406 0.61178897
## 37 38 39 40 41 42
## -0.22773481 0.13305563 -0.08561953 0.78941248 0.68842171 0.88612350
## 43 44 45 46 47 48
## 0.24762083 0.74627960 1.64164452 1.25118444 1.50922594 0.72591183
## 49 50
## 0.83529205 0.81723176
shapiro.test(PCA1)
##
## Shapiro-Wilk normality test
##
## data: PCA1
## W = 0.98054, p-value = 0.575
t.test(PCA1 ~ exposicao)
##
## Welch Two Sample t-test
##
## data: PCA1 by exposicao
## t = -3.8256, df = 36.281, p-value = 0.0004957
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -1.1656423 -0.3580773
## sample estimates:
## mean in group Norte mean in group Sul
## -0.5028275 0.2590323
ordNMDS<-metaMDS(as.data.frame.matrix(matriz.parc), k=4)
fig <-ordiplot(ordNMDS, type = "none")
points(fig, "sites", pch=19,select=exposicao=="Norte")
points(fig, "sites", pch=1, select=exposicao=="Sul")
sp.names <- make.cepnames(colnames(matriz.parc))
stems <- colSums(matriz.parc)
orditorp(ordNMDS, "sp", label = sp.names,
priority=stems, pch="+", pcol="grey")
legend(x = "topleft", legend = c("Norte", "Sul"), pch = c(19,1))
fig <-ordiplot(ordNMDS, type = "none")
points(fig, "sites", pch=19,select=exposicao=="Norte")
points(fig, "sites", pch=1, select=exposicao=="Sul")
sp.names <- make.cepnames(colnames(matriz.parc))
stems <- colSums(matriz.parc)
orditorp(ordNMDS, "sp", label = sp.names,
priority=stems, pch="+", pcol="grey")
legend(x = "topleft", legend = c("Norte", "Sul"), pch = c(19,1))
ordisurf(ordNMDS ~ PCA1, col = "blue", add = TRUE)