The data are age-adjusted (2000 U.S. standard) female lung cancer mortality rates (per 100,000 population) for each year from 1996 to 2010.
TSdata
The third dimension [,,v] of 2 or 4 elements is the x or y values during the time period. If the no confidence data is provided, the third dimension is 2:
If a confidence band is being plotted in \var{tsconf} graphs then there are 4 elements.
For example, the x,y coordinates for year=1996 (time period = 1) for the first state (AK) is TSdata[1,1,c(1,2)]. This approach was done to allow a data matrix built for the "tsconf" glyphics to be used for a ts glyphics.
# how to create a new time series data set tempTS <-read.table("...yourfilename.csv",sep=",",header=T) yrmat <-matrix(rep(1996:2010,51),nrow=51,ncol=15,byrow=T) # year labels ratemat<-as.matrix( tempTS[,c(8,13,18,23,28,33,38,43,48,53,58,63,68,73,78)] ) locimat<-as.matrix( tempTS[,c(9,14,19,24,29,34,39,44,49,54,59,64,69,74,79)] ) hicimat<-as.matrix( tempTS[,c(10,15,20,25,30,35,40,45,50,55,60,65,70,75,80)] ) workmat<-cbind(yrmat,ratemat,locimat,hicimat) TSdata <-NULL TSdata <-array(workmat,dim=c(51,15,4)) # change state ab from factors to characters. rownames(TSdata)<-as.character(tempTS$stab)