Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #when given a excel file
- #data<-read.csv("filename.csv",header=TRUE)
- #clear console ctrl+l
- #Lab class 7
- #1
- setwd("C:\\Users\\IT18100662\\Desktop\\LAB CLASS 07-20190910")
- getwd()
- data<-read.table('Forest.txt',header = TRUE, sep = ",")
- #display data
- fix(data)
- attach(data)
- #2 summery/structure of the dataset
- str(data)
- #3
- #517 obs means 517 rows
- #4
- min(wind)
- max(wind)
- #5 Five number summery
- summary(temp)
- #6 to get Outliers - create a boxplot
- boxplot(wind,horizontal = TRUE,pch=3)
- #normal distribution, if median band in left-> tail goes right then positive dist.
- #if median band in right-> negative dist
- #7Negative distibutuon
- #8median of temp
- median(temp)
- #9
- mean(wind)
- sd(wind) #standard deviation
- #sapply gives all x of every column
- #sapply(data,x)
- sapply(data,sd)
- #10 interpartile = q3-q1
- IQR(wind)
- #11 get freq table
- freq<-table(day,month)
- freq
- #12 average= mean
- mean(temp[month=="sep"])
- #13
- barplot(freq,beside = TRUE,xlab = "Month",ylab = "Frequency",legend=rownames(freq))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement