I would like to have a relative x-axis in r. I am reading time seris from
an excel file and I want to show in a plot and also I want to have a window
which moves over the values.

My aim ist to see which point belongs to which time(row number in excel
file). i.e I am reading from 401th row in 1100th column in excel file and
my window length is 256. here is my code:

#which column in excel filespalte<-1100
#start row and end row
start<-401end<-600

window<-256
n<-1

wb <- loadWorkbook("D:\\MA\\excel_mix_1100.xls")
dat <-readWorksheet(wb, sheet=getSheets(wb)[1], startRow=start,
endRow=end, startCol=spalte, endCol=spalte,header=FALSE)
datalist<-dat[seq(1, length(dat[,1]), by = 2),]
datalist<-matrix(datalist)while(1+window<=length(datalist)){
  kd<-matrix(as.integer(datalist[n:(n+window-1),1]))
  Sys.sleep(0.2)
  
plot(kd,type="l",col="blue",xlab="Rohdaten",ylab="values",xlim=c(start+n,start+n+window-1))
  n<-n+1}

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to