Joclad 2010 d

344 views

Published on

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
344
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Joclad 2010 d

  1. 1. aoliveira@univ-ab.pt, toliveir@univ-ab.pt
  2. 2. plot( ), boxplot( ), hist( )
  3. 3. nome(argumento1,argumento2,...)>plot(x,y,xlab="Peso",ylab="Altura",main=’’Diagrama de dispers˜o’’, col=2) a
  4. 4. graphicslattice
  5. 5. > demo(graphics) # programa de demonstrac˜o ¸a
  6. 6. plot( ) - caso unidimensional(base de dados "iris" dispon´vel no R) ı>iris.joclad<-iris>names(iris.joclad)<-c(Comp.S´pala,"Larg.S´pala", e e"Comp.P´tala","Larg.P´tala", "Esp´cies") e e e>plot(Comp.S´pala) e
  7. 7. plot( )>iris.joclad<-iris>names(iris.joclad)<-c(Comp.S´pala,"Larg.S´pala", e e"Comp.P´tala","Larg.P´tala", "Esp´cies") e e e>plot(Comp.S´pala, ylab="Comprimento S´pala (cm)", e ecol="red", pch=20, cex=1.4, main="Anderson Iris data")
  8. 8. plot( ) - caso bidimensional>iris.joclad<-iris>names(iris.joclad)<-c(Comp.S´pala,"Larg.S´pala","Comp.P´tala", e e e"Larg.P´tala", "Esp´cies") e e>plot(Comp.S´pala,Comp.P´tala) e e
  9. 9. plot( )>iris.joclad<-iris>names(iris.joclad)<-c(Comp.S´pala,"Larg.S´pala","Comp.P´tala", e e e"Larg.P´tala", "Esp´cies") e e>plot(Comp.S´pala,Comp.P´tala, xlab="Comprimento S´pala e e e(cm)", ylab="Comprimento P´tala (cm)", col=3, pch=6) e>abline(lm(Comp.P´tala Comp.S´pala),col=2) e e
  10. 10. pairs( ), para matrizes de diagramas dedispers˜o a
  11. 11. barplot( ) - unidimensional>require(grDevices) # for colours>tN <- table(Ni <- stats::rpois(1000, lambda=4))>barplot(tN, col=rainbow(20))
  12. 12. barplot( ) - multidimensional>barplot(height = cbind(Jovem = c(465, 91) / 465 * 100,Adulto = c(840, 200) / 840 * 100, Idoso = c(37, 17) / 37* 100), beside = FALSE, width = c(465, 840, 37), col =c(1, 2), legend.text = c("Antes tratamento", "Ap´s otratamento"), args.legend = list(x = "topleft"))
  13. 13. boxplot( )
  14. 14. hist( )>hist(Comp.P´tala, breaks = "Sturges", + main = epaste("Histograma"), + xlab = "Comprimentos das P´talas e(cm)", ylab="Frequˆncia", + axes = TRUE, plot = TRUE, eylim=c(0,40), col=c(1,2,3,4,5,6,7,8,9,10,11,12))
  15. 15. persp( )
  16. 16. ¸˜> demo(lattice) # programa de demonstracao
  17. 17. barchart( )>barchart(peso,variedade | local, data = cevada, groups= ano, layout = c(1,6), stack = TRUE, auto.key =list(points = FALSE, rectangles = TRUE, space ="right"), ylab = "Peso de cevada (Ton./ha)", scales =list(x = list(rot = 45)))
  18. 18. densityplot( )> densityplot( altura | voz, data = cantor, layout =c(2, 4), xlab = "Altura (polegadas)", bw = 5)
  19. 19. dotplot( )> dotplot(variedade,peso | ano * local, data=cevada)
  20. 20. histogram( )>histogram( altura | voz, data = cantor, nint = 17,endpoints = c(59.5, 76.5), layout = c(2,4), aspect = 1,xlab = "Altura (polegadas)")
  21. 21. xyplot( )>xyplot(Comp.P´tala e Larg.P´tala, data=iris, egroups=Esp´cies, auto.key=T) e
  22. 22. cloud( )>par.set <- list(axis.line = list(col = "transparent"), clip = list(panel = "off"))print(cloud(Larg.S´pala e Comp.P´tala * Larg.P´tala, data = iris, cex = .8, groups = e eEsp´cies, screen = list(z = 20, x = -70, y = 3), par.settings = par.set, scales = elist(col = "black")), split = c(1,1,2,1), more = TRUE) print(cloud(Comp.S´pala eComp.P´tala * Larg.P´tala, data = iris, cex = .8, groups = Esp´cies, screen = list(z e e e= 20, x = -70, y = 0), par.settings = par.set, scales = list(col = "black")), split =c(2,1,2,1))
  23. 23. biplot e triplot)> library(agricolae)> library(klaR)> data(Oat2)> startgraph> biplot> model<- AMMI(Oat2[,1], Oat2[,2], Oat2[,3], Oat2[,4],xlim=c(-35,20),ylim=c(-20,20),graph="biplot")> model<- AMMI(Oat2[,1], Oat2[,2], Oat2[,3], Oat2[,4],xlim=c(-35,20),ylim=c(-20,20),graph="biplot",number=FALSE)> triplot> model<- AMMI(Oat2[,1], Oat2[,2], Oat2[,3], Oat2[,4],graph="triplot")

×