So I am trying to compute a phase plane plot of some functional data, its is measured against time so I want the labels on the plot to mark every 12 hours.
attach(alldata)
#identify the time measure form the data, and make a vector
tdata<-data.matrix(alldata[,1:1])
timev<-as.vector(tdata)
#identify the control group
control<-data.matrix(alldata[,2:25])
#create basis and smooth and create functional object
basis17<-create.fourier.basis(rangeval=c(0,5.24677083333333), nbasis=17)
csbasis17<-smooth.basis(argvals=tdata,control,basis17)
controlfd<-fd(coef(csbasis17),basis17)
#creaste list of points whre i was labels to go and name them
th<-list("12 hours"=timev[1:1],"24 hours"=timev[15:15],"36 hours"=timev[29:29],"48 hours"=timev[43:43],
"60 hours"=timev[50:50], "72 hours"=timev[57:57], "84 hours"=timev[71:71],
"96 hours"=timev[85:85] ,"108 hours"=timev[100:100],"120 hours"=timev[114:114], "136 hours"=timev[128:128])
#crerate list of 2 containing the points i want plotted and the names
ws<- list(th,labels(th))
#phase plane plot command
phaseplanePlot(timev,controlfd,Lfdobj1=1, Lfdobj2=2,
lty=c("longdash", "solid"),
labels=ws)
This produces the following plot, with no labels?
and this is what comes up in the error bar
Error in text.default(D1., D2., labels$labels) :
no coordinates were supplied
I cant figure out how to fix it??