[R] Fast continious wavelet transformation (CWT) and plot?
Dear all, This is my test code: library(wmtsa) sunspotsLong <- rep(sunspots, times=3000) ## try "times=30" (or 300) sunspots.cwt <- wavCWT(sunspotsLong) plot(sunspots.cwt, series=TRUE) If you adapt times in the second line with "30", the code works. But 300 or 3000 not so much. Are there more faster ways to calculate the CWT? Different packages that are better for the continious wavelet transform? My real time series has around 1 Million observations. Stefan [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.
[R] Lattice barplot not wokring in for-loop?
Dear List-Members, I am plotting a barplot with the lattice package. The code works, but when I execute the same code in a for-loop no plot is shown. Can't figure what the problem is. (Maybe I am missing something here, but I tried it with plot device pdf, calling windows() or X11(), testing on windows and linux, etc.) INFO: R version 2.9.1 (2009-06-26) using Windows/RGui require(lattice) for( z in 1:3) { ## plot works when executed alone, ## however in a for loop no plot is shown... barchart(yield ~ variety | site, data = barley, groups = year, layout = c(1,6), stack = TRUE, auto.key = list(points = FALSE, rectangles = TRUE, space = "right"), ylab = "Barley Yield (bushels/acre)", scales = list(x = list(rot = 45))) } I can't program any further without solving this. So, thanks! Really! Steve __ 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.
Re: [R] Novel (Maybe?) Visualizations
2010/2/10 Johannes Huesing : > D. Dashcle [Wed, Feb 10, 2010 at 01:13:58AM CET]: > I would look for "graphviz" in www.rseek.org and procede from there. Is graphviz really the only option? I guss so, but the license of graphviz is very restricted and not comparable to the usal open source licenses, e.g. GPL or similar. I spent about a day to find information on graphs in R, search and searched, tried many libraries, etc. Compared to other subjects or areas, I found very little and the quality was limited. What I need would be: - import/export from GraphML - basic and advanced graph algorithms - nice visualization of graphs (graphviz) - interactive input of graphs (or external program and import via GraphML) Is R the right programming language for that? (I think it is...) Are there any pointers? Books or tutorials on using R for graph stuff.? Any help is very much appreciated! Best regards, St. __ 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.
[R] Error when running the examples in plotMultiTS / QRMlib
Dear List, R ist somtimes a bit frustrating... I ran the example from http://bm2.genes.nig.ac.jp/RGM2/R_current/library/QRMlib/man/plotMultiTS.html and I get an error. Has someone an explanation for this? Thanks a lot, Steve CODE: library(R.utils) library(tseries) library(wmtsa) library(waveslim) library(brainwaver) library(timeSeries) library(QRMlib) > ?plotMultiTS > data(DJ); > Sdata <- window(DJ, from="1993-01-01", to="2000-12-31"); > #select only 4 stocks from 30-stock index: > tsSelections <- c("GE","INTC","KO","JNJ"); > Sdata <- Sdata[,tsSelections]; Error in .subset(x, i, j, drop = FALSE) : object of type 'S4' is not subsettable > Zdata <- log(Sdata); > rm(Sdata); > #Plot all 4 columns on same graph: > plotMultiTS(Zdata, reference.grid=TRUE); Error: subscript out of bounds > #plot only columns 2 and 3 on the graph: > plotMultiTS(Zdata, colvec= c(2,3),reference.grid=TRUE, format="%Y-%m"); Error in .subset(x, i, j, drop = FALSE) : object of type 'S4' is not subsettable 2nd question: running > plotMultiTS i find the line: "xxx = tS[, i...@data" Why would someone name a variable "xxx"? Is this some "feature" or just poor programming? __ 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.
Re: [R] Save results
Hi Jose, Have you tried: Z <- diag(10) write.csv(Z, file = "mymatrix.csv") type "?write.csv" to see the options to get a better result with excel. However you can open the file "mymatrix.csv" with excel (it is stored in the "My Documents" folder in windows). Ok, hope that helps. Next time you can try also a goolge search like "r-help csv". Regards, Steve 2009/7/16 Jose Narillos de Santos : > I imagine I make a function whose results are a Matrix Z > > How cn I save in a txt or excel file the result of apply my function? > > something similar to save Z.txt. > > Thanks in advance. > > [[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. > __ 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.
[R] zoo plot: yearly marks on X-Axis
Hi all, I am plotting a financial time series, but I need a more detailed X-Axis. Example: x <- zoo(rnorm(1:6000), as.Date("1992-11-11")+c(1:6000)) plot(x) The X-Axis is labeled "1995", "2000" and "2005". I would need either "1995", "1997", etc. or maybe yearly I used google first, then look at "?plot.zoo" but could't get it working. Regards, Steve __ 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.
[R] ggplot2 box plot notches
Dear List, I just googled to find out if notched box plots are possible with ggplot2, but couldn't find a answer to it. boxplot() has the option: notch = TRUE, e.g.: boxplot(mpg$hwy, notch=TRUE) My example code (taken from the net) is: require(ggplot2) qplot(class, hwy, fill=factor(year), data=mpg, geom="boxplot", position="dodge")+theme_bw() Thank you for you help! Steve __ 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.
Re: [R] ggplot2 box plot notches
Dear Thierry, Thank you very much for the fast reply. Is there a way not to plot outliers in the ggplot2 boxplots? In a way that the scale of the y-axis is rendered as if there was no outlier? (not just the the ouliers removed with the same scale of the y-axsis...) [ example for a boxplot: qplot(mpg, wt, geom="boxplot", data=mtcars) ] My only solution would be to remove outliers before doing the boxplot Thanks again, Stephan PS: I think there could be a typo in the help of qplot, at least in version 2.9.1 I think "data=mtcars" is missing # Use different geoms qplot(mpg, wt, geom="path") qplot(factor(cyl), wt, geom=c("boxplot", "jitter")) __ 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.
[R] why is adnonis function called adonis {package vegan}
Hello all, I used google and looked at the documentation to find out why the ADONIS function is called adonis (in the vegan package). I am writing a document and would like to include a abbreviation list (similar to "ANOSIM = Analysis of Similarities"). regards, Steve __ 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.
[R] unicode variable and function names?
Dear List, Is it possible to have function names like ∀ (unicode universal quantifier)? This question is inspired by agda source code, which supports this. http://www.cs.nott.ac.uk/~nad/listings/lib-0.4/Algebra.html It would be handy to use. My guess is, however, that it's not supportet in R. Regards, Steve __ 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.
[R] using wavelet transform to calculate mean frequency of a signal
Dear list, in short: I would like to calculate the mean frequency of a signal (e.g. time series) using the wavelet transform. with details: I did not find a R function to calculate a mean frequency using one of the cran packages. My searches using R Site Search returned: **(1)waveclock {waveclock}R Documentation Reconstruction of the modal frequencies in a time series using continuous wavelet transformation and the "crazy climbers" algorithm (this look like what I wanted to do, but I can't figure it out) **(2) tfmean {Rwave}R Documentation Average frequency by frequency (this seems not to help either) I am a bit desperate at the moment and would very, very much appreciate any help. Regards, Stephan [[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.