similar to: Plotting series marked with a symbol on every nth data point, preferably in ggplot...

Displaying 20 results from an estimated 2000 matches similar to: "Plotting series marked with a symbol on every nth data point, preferably in ggplot..."

2013 Jan 29
1
problem wih plotrix:cluster.overplot
Hello, I am trying to use cluster.overplot from package plotrix and I get an error message when I add the "away" parameter: require(plotrix) distance <- read.table("distance.txt") cmd <- cmdscale(distance) cp <- cluster.overplot(cmd, away=2) Error in if (sum(overplots) > 1) { : missing value where TRUE/FALSE needed If I don't use "away",
2011 Oct 21
2
plotting with a symbol on every nth point
Hi, I would like to produce a plot with a symbol on every nth point in a time series data, like the one in the following: http://www.phon.ucl.ac.uk/home/yi/ProsodyPro/EnglishFocus.png x <- seq(-100,1000,25) plot(x,type="l") Could someone help me out with the above example? Thanks.... [[alternative HTML version deleted]]
2008 Mar 13
2
Plot contour over filled contour
Dear R-users, I haven't found a way in the searchable archive to overplot a contour (lines) over a surface. I have a (n,m) matrix that represents sea surface temperature that I have plotted using image.plot(), filled.contour() or image(). I would like to overplot this image with some contour lines of mixed layer depth values(same size matrix). How can I do this? Any help is appreciated,
2005 Oct 25
1
selecting every nth item in the data
I want to make a glm and then use predict. I have a fairly small sample (4000 cases) and I want to train on 90% and test on 10% but I want to do it in slices so I test on every 10th case and train on the others. Is there some simple way to get these elements? Stephen -- 21/10/2005 [[alternative HTML version deleted]]
2012 Apr 05
3
Apply function to every 'nth' element of a vector
Dear R users, how do I e.g. square each second element of a vector with an even number of elements? Or more generally to apply a function to every 'nth' element of a vector. I looked into the apply functions, but found no hint. For example: v <- c(1, 2, 3, 4) mysquare <- function (x) { return (x*x) } w <- applyfun(v, mysquare, 2) then w should be c(1, 4, 3, 16) Thanks for
2012 Dec 02
2
How to calculate mean of every nth time series data with zoo or xts ?
Hello, I have 1-minute time series stock data and I'd like to calculate mean of every n-th candle data of m-days. result = c(mean of 1th data, mean of 2nd data, ...) mean of 1th data = (1th data of 2012-1-1 + 1th data of 2012-1-2 + 1th data of 2012-1-3) / 3 mean of 2nd data = (2nd data of 2012-1-1 + 2nd data of 2012-1-2 + 2nd data of 2012-1-3) / 3 ... Could you let me know the fastest
2001 Mar 28
4
How to extract every nth element from a vector
R-helpers: Is there a simple way to extract every nth element from a very long vector? [The vector I want to sample from is an object returned by lowess(). It is so long (11,628 pairs of elements) that it is causing non-R-related memory problems elsewhere. I don't see a better way other than sampling the output returned from lowess.] Thanks in advance. Barry Cooke
2007 Feb 13
4
matlab style plotting in R
Hello I was wondering how I can achieve matlab style plotting in R, in the sense that matlab allows you to plot multiple sets of variables within the same x-y axes. plot in R does not seem to cater for this. I tried 'overplot' from the gplots package but this assumes different y axes for the variables. any suggestions would be very appreciated Maria [[alternative HTML version
2011 Jul 14
1
plotting x y z data from an irregular grid
Hi, I'm trying to plot some data (z) that is linked to lat&long coordinates (x&y). These coordinates are not however on a regular grid. I also have some shapefiles on which I would like to overlay the data. I can plot the shapefiles (country/city outlines) and overplot the data, but only using quilt.plot because I otherwise always get the error message that 'Error in
2008 Aug 18
2
Fwd: Parsing XML or KML into CSV /Using R for geocoding , OR problem
Hi, I have a data file in a KML format which is Google Earth's format for geographic data. I need to import it into a csv file . How can I do that. KML format is just like XML format .example below Which R module with deal with an OR problem (like transportation problem using geo coded data as in the example below) Regards, Ajay www.decisionstats.com - <?xml version="1.0"
2009 Nov 22
1
"Over-coloring" facets on persp() plot
Dear R Community: Recently, I have managed to plot some really useful graphs of my research data using persp(). I have even figured out how to overplot rectangular regions (corresponding to submatrices) with a different color. This is accomplished by using par(new=T). I am now searching for a way to "highlight" a set of (possibly non-contiguous) facets with a specific color,
2007 Mar 26
1
using alpha transparency for lines in levelplot
Hello, I'm having trouble with using the alpha channel for transparency with lines with lattice levelplots. If I use transparency via the alpha argument to rgb to overplot lines on levelplot the transparent colour affects all of the region colours in the plot. Can anyone explain why the difference in region colours? #### Warning: this code attempts to create PDF files in working directory
2007 Jul 01
1
implementing MovieClip drawing API
Hi, I would like to implement MovieClip.{moveTo,lineTo,lineStyle}. I initially thought I could place an SwfdecShape inside an SwfdecSpriteMovie created by createEmptyMovieClip then call swfdec_shape_ counterparts when MovieClip.{moveTo,lineTo,lineStyle} were called. It wasn't as easy as I had thought. All the functions are highly tied to swf bitstream, even adding an SwfdecShapeMovie to
2005 Oct 10
2
possible bug in image() ??
Hi everyone. The function image() seems not to be correctly plotting some matrices that I give it. (I佲檓 using R 2.1.1) The following code creates a matrix (denoted x) with 1500 rows and 3 columns, with all entries 0 or 1, and then plots the image of this matrix. cc=runif(n=1500,min=0.1,max=1.2) ccc=ceiling(cc-1) dd=runif(n=1500,min=0.1,max=1.2) ddd=ceiling(dd-1)
2008 Sep 05
2
Use of colour in plots
Dear all, I have 3 datasets all of which share the same longitude and latitude values, which I'm looking to plot onto a scattergraph. The third dataset has values which can only be either '1' or '2'. So to incorporate all three datasets onto two axes, I'm wondering if I can plot dataset1 and dataset2 as normal, but then use colour to determine whether these points are
2006 Jul 25
3
Overplotting: plot() invocation looks ugly ... suggestions?
Hi WizaRds, I'd like to overplot UK fuel consumption per quarter over the course of five years. Sounds simple enough? Unless I'm missing something, the following seems very involved for what I'm trying to do. Any suggestions on simplifications? The way I did it is awkward mainly because of the first call to plot ... but isn't this necessary, especially to set limits for the
2007 Sep 19
2
Identify and plotting symbols.
I have been trying, unsuccessfully, to use identify() to (simply) return a list of the indices of points clicked on and overplot (with say a solid dot) each clicked-on point so that I can see where I've been. I.e. I don't want to see the indices printed on the screen; I just want the points I've already selected to be highlighted. I tried ind <-
2009 Mar 19
2
nth root
Hi, Is there a function in R to calculate the nth root, similar to the MATLAB function NTHROOT()? Thanks, Martin Biuw [[alternative HTML version deleted]]
2009 Feb 17
1
plot.lm: "Cook's distance" label can overplot point labels
The following code demonstrates an annoyance with plot.lm(): library(DAAGxtras) x11(width=3.75, height=4) nihills.lm <- lm(log(time) ~ log(dist) + log(climb), data = nihills) plot(nihills.lm, which=5) OR try the following xy <- data.frame(x=c(3,1:5), y=c(-2, 1:5)) plot(lm(y ~ x, data=xy), which=5) The "Cook's distance" text overplots the label for the point with the
2008 Apr 22
2
nth step transition matrices
Hello, I have a question in regards to markov chains and transition probabilities. I am trying to figure out a way to calculate the "kth-step transition matrix" of a given matrix. Say for example I have a single step 2x2 matrix: 1 2 P= 1 .95 .05 2 .01. 99 If I were to convert this matrix to a 2-step transition probability matrix I would get: