K.E.Vorloou
1999-May-20 14:50 UTC
[R] Wavethresh + accessC > Error: wd.structure has no class
Hi, Whenever I issue this commands (as in the help for the threshold function), # # Do a 1D decomposition # tdecomp <- wd(test.data) # # Threshold it # tdecomp.thresh <- threshold(tdecomp) # # Reconstruct from the thresholded coefficients # trecons <- wr(tdecomp.thresh) # # Plot the reconstructed function # plot(accessC(trecons)) I receive the following reply: Error: wd.structure has no class Does anybody know what the problem is ? Best, Costas -- ------------------------------------------------------------------------- Konstantinos E. Vorloou | Tel: +44 (0)191 374 1821 Department of Economics & Finance | Fax: +44 (0)191 374 7289 University of Durham, | email: K.E.Vorloou at durham.ac.uk 23/26 Old Elvet, | or : vorlow at rocketmail.com Durham DH1 3HY, | or : Vorlow at bigfoot.com UK. | Express: 20595534 at pager.mirabilis.com | ICQ number: 20595534 http://www.durham.ac.uk/Economics | http://www.durham.ac.uk/~dec3kev ------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: https://stat.ethz.ch/pipermail/r-help/attachments/19990520/6d822c56/attachment.html
Arne Kovac
1999-May-20 15:27 UTC
[R] Wavethresh + accessC > Error: wd.structure has no class
On Thu, 20 May 1999, K.E.Vorloou wrote:> tdecomp <- wd(test.data) > tdecomp.thresh <- threshold(tdecomp) > trecons <- wr(tdecomp.thresh) > plot(accessC(trecons)) > > I receive the following reply: > > Error: wd.structure has no class > > Does anybody know what the problem is ?trecons is a vector, but accessC returns the "smooth" coefficients of some wavelet decomposition. Therefore accessC(trecons) does not make sense. If you want to plot the reconstructed function try simply> plot(trecons)(maybe with an optional ty="l" argument to get straight lines) If you want to extract the smooth coefficients at level j, try something like> tdecomp.Cj<-accessC(tdecomp.thresh,level=j)Best Arne -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._