Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # NAMU DARBAS
- getwd
- setwd("D:/Programavimas/R/ND")
- #...1...
- #...2...
- #...3...
- #...4...
- duomenys <- read.table("liquor5.csv", sep=",", dec=".", header = T)
- #1 Kintamuju tipu nustatymas
- str(duomenys)
- #2
- v2 <- duomenys[,2];v2
- v3 <- duomenys[,3];v3
- #3
- table(v2)
- par(mfrow=c(1,2))
- barplot(table(v2), xlab="Metai", ylab="Kiekis", horiz=FALSE, main="Stulpeline diagrama", )
- pie(table(v2), main="Skrituline diagrama")
- Mode <- function(x) {
- ux <- unique(x)
- ux[which.max(tabulate(match(x, ux)))]
- }
- Mode(v2)
- #4 int- kiekybinins diskretus, num - kiekybinis tolydus, factor - kokybinis kint
- par(mfrow=c(2,1))
- hist(v3, freq=FALSE, main="Histograma")
- boxplot(v3, horizontal = TRUE, main="Staciakampiu diagrama")
- #5
- #6
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement