I have attached the signal that causes the error message in this email subject. Only columns 1 and 3 have to be considered. It is the work trajectory of a molecule migrating between two equilibrium conformations. The curve has 2 peaks, as shown in its plot. But I keep missing the 2nd one. Here is my short script:
library(wmtsa) setwd("C:/Documents and Settings/Monville/Alanine Dipeptide/Work_curves-Dir") work <- as.ts(read.table ("calc_work_332")[,c(1,3)]) plot(work[,1],work[,2]) work.wt <- wavCWT(work, n.scale=1000) scales <- attr(work.wt, "scale") work.tree <- wavCWTTree(work.wt,tolerance=0.5/sqrt(scales)) work.peak <- wavCWTPeaks(work.tree) > summary(work.tree) End Time Length Octaves Min Max Mean SD Var MAD 1 1043 79 11.78 -6.46e-09 1.96e+06 3.58e+05 6.24e+05 3.89e+11 0.102 2 NA 17 1.95 6.30e-01 1.26e+01 8.09e+00 3.13e+00 9.81e+00 3.249 > work.peak <- wavCWTPeaks(work.tree) Error in if (time.start < times.range[1]) time.start <- times.range[1] : missing value where TRUE/FALSE needed The above error appears for all tolerances less than 0.95/sqrt(scales) when only the 1st peak is found. > work.tree <- wavCWTTree(work.wt,tolerance=0.95/sqrt(scales)) > summary(work.tree) End Time Length Octaves Min Max Mean SD Var MAD 1 1043 78 11.7 -6.4e-09 1957560 362197 626303 3.92e+11 0.0533 > work.peak <- wavCWTPeaks(work.tree) > attr(work.peak,"peaks") branch itime iscale time scale extrema iendtime 1 1 1238 64 1238 995 1957560 1043 What am I doing wrong ? Please, explain Thank you very much. Maura e tutti i telefonini TIM! Vai su
______________________________________________ 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.