Advertisement
Guest User

Untitled

a guest
Nov 12th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. #Wykres 1
  2. plot(sr~dpi, xlim = c(0, 5000),
  3. xlab = 'Przychód Per-Capita',
  4. ylab = 'Oszczednosci (zsumowane)',
  5. main = 'Miedzynarodowe inforamcje o oszczednosciach',
  6. data = LifeCycleSavings[1:50,])
  7.  
  8. with(LifeCycleSavings[1:50,],
  9. text(sr~dpi,
  10. labels = row.names(LifeCycleSavings[1:50,]), pos = 4))
  11.  
  12. #Wykres 2
  13.  
  14. x <- LifeCycleSavings[order(LifeCycleSavings$dpi),decreasing=T]
  15. y <- x[31:50,]
  16. y
  17.  
  18.  
  19. values <- y$dpi
  20. names = row.names(y)
  21. data <- data.frame(
  22. name=names[1:20],
  23. value=values[1:20]
  24. )
  25.  
  26. data
  27.  
  28. barplot(
  29. height=data$value,
  30. names=data$name,
  31. horiz=T,
  32. las=1 ,
  33. xlim=c(0,4200),
  34. ylim=c(0,20),
  35. xlab="Przychody",
  36. col=rainbow(20))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement