Sei sulla pagina 1di 1

###ECV5421 EXERCISE###

#to export future flows


class(HFm)#thames@Kingston

#to import Annual Maxima flows


AMflowsTh<-read.csv("HFm.csv")
View(AMflowsTh)
class(AMflowsTh)

#extract only the AM data


AMflowsTh2<-AMflowsTh[,2]
View(AMflowsTh2)
class(AMflowsTh2)

#to plot the dataset as timeseries


AMhist<-ts(AMflowsTh2,start=1885, end=2012)
View(AMhist)
class(AMhist)

win.graph(width=4.875, height=3, pointsize=8)


plot.ts(AMhist, xlab='Year',ylab='cumecs',type='o',
main='Thames at Kingston Annual Maxima Flow Series')
grid()
abline(h=mean(AMflowsTh2),col=2,lty=3)
labels<-c('mean')
legend("topright",labels,lwd=1,lty=3,col=2,inset=.05)

Potrebbero piacerti anche