Hello everyone, I have been using bReeze package for weibull distribution analysis. In this package, there is a function called 'formatTS' for converting time stamps from string to POSIXlt. (http://rgm3.lab.nig.ac.jp/RGM/R_rdfile?f=bReeze/man/formatTS.Rd&d=R_CC) This is a part of process to plot and calculate shape and scale of the distribution. However, this function keeps showing an error message.
ts1 <- formatTS(time.stamp = winddata_ballarat[,1]) 1 1383549939 2 1383549939 3 1383549939 4 1383549953 Error in formatTS(time.stamp = winddata_ballarat[, 1]) : No pattern found The format of the time series (200000 rows) I have is dd.mm.yyyy hh:mm for 12 years.. such as.. Time Wind speed Wind direction 25.07.2000 0:00:00 15 20 25.07.2000 0:30:00 11 20 25.07.2000 1:00:00 18 10 25.07.2000 1:30:00 17 10 25.07.2000 2:00:00 22 360 25.07.2000 2:30:00 22 360 25.07.2000 3:00:00 26 360 25.07.2000 3:30:00 28 360 . . . . . . . . . . . . . . . I have no idea why the function cannot find a pattern.. Surprisingly, when the same data and the same function was used in my colleague's computer, it worked. So I tried processing in other computers but failed. I tried using strftime function too but result is not reliable, which indicates there is a mismatch between the time stamp I created and wind speed. Could anyone know why it keeps happening and how to solve this problem? All R codes are described below: winddata_ballarat <- read.csv("ballarat1.csv",header=TRUE,sep=",") set2 <- createSet(height=10, v.avg=winddata_ballarat$Wind.speed, dir.avg=winddata_ballarat$Wind.direction) ts1 <- formatTS(time.stamp = winddata_ballarat[,1]) kangmin.ballarat <- createMast(time.stamp=ts, set2) kangmin.ballarat.wb <- weibull(mast=kangmin.ballarat, v.set=1, print=FALSE) plotWeibull(wb=kangmin.ballarat.wb, show.ak =TRUE) weibull(mast=kangmin.ballarat, v.set=1) Thank you. -- View this message in context: http://r.789695.n4.nabble.com/Formatting-time-stamps-for-weibull-distribution-tp4679666.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.