Skip to content
Prev 139449 / 398506 Next

plotting zoo object

JAN	FEB	MAR	APR	MAY	JUN	JUL	AUG	SEP	OCT	NOV	DEC
1968	NA	10.7	10.0	9.3	7.4	8.1	9.3	9.5	8.5	10.0	10.0	13.0
1969	13.0	9.9	7.0	5.9	NA	6.5	7.3	6.6	NA	NA	NA	NA
1970	10.7	8.9	8.1	NA	NA	7.1	7.7	NA	6.5	NA	8.3	NA
1971	NA	11.6	NA	NA	7.8	NA	NA	6.2	NA	NA	8.4	NA

x<-read.zoo("textconnection", sep=",", format= "%Y", header=TRUE)
plot(x)

#this plots all of the years by each month.  I would like to plot one
long time series from 1968 to 1971
#is there an easy way to do this?  I can reformat the data in excel so
that the index will be year then month, but this will take a while.
the end goal is #to be able to apply some signal processing things
like spectral density after fitting the seasonal trend etc.
thanks

Stephen