similar to: Line graphs with NA

Displaying 20 results from an estimated 30000 matches similar to: "Line graphs with NA"

2010 May 05
1
'matplot' for matrix with NAs: broken lines
Hi list, I know that points involving NAs are not plotted in 'matplot', but when I plot them as lines, I still want the lines to connect all the points (i.e. not broken where there are NAs).? Please see the example below.? How can I achieve this in 'matplot'?? If I can't, any good alternatives so I don't have to use 'plot' + 'lines' and loop through all the
2005 Oct 21
3
make three plot to one plot
Dear all, I want to make three plot below to only one plot together with legend, how can I do that? I have tried with matplot function but I did not succeed. Thanks for your help. Sincerelly, Jan Sabee test.five.x <- c(0.02,0.05,0.07,0.09,0.10,0.12,0.13,0.14,0.16,0.17,0.20,0.21,0.34,0.40) test.five.y <- c(18,12,17,12,3,15,1,5,1,1,3,10,15,10) plot(test.five.x, test.five.y,
2007 Sep 20
1
Time series graphs, question about using zoo
Hi, Can you tell me what is the meaning for "tail, 1" in "aggregate"? I also want to get some similar graph, but the data is not time series data. Suppose here is my data one, I want a graph with x-axis is just the index(1:9). The graph plot all the variable A, B,C,D. So there should be 4 lines for each graph. For the A line, at each time point, the letter A should be on
2007 Jul 19
2
linear interpolation of multiple random time series
Hi all, Looking for tips on how I might more optimally solve this. I have time series data (samples from a force sensor) that are not guaranteed to be sampled at the same time values across trials. ex. trial time x 1 1 1 1 5 4 1 7 9 1 12 20 2 1 0 2 3 5 2 9 10 2 13 14 2 19 22 2 24 32 Within each trial I'd like to use linear interpolation between each successive time sample to fill in
2007 May 27
1
na.approx and columns with NA's
Hi, I have a object 'zoo': dim(zz) [1] 720 5551 where some columns only have NA's values (representing land data in a sea surface temperature dataset) I find straightforward the use of 'na.approx' for individual columns from the zz matrix, but when applied to the whole matrix: zz.approx<-na.approx(zz) Erro en approx(along[!na], y[!na], along[na], ...) : need
2001 Nov 29
2
plotting (a) confidence intervals (b) standard error
Hi all, I'm building a plot of the values in tmeant (below) against positions 1 to 5, using matplot. tmeant looks like this: case1 case2 pos1 861.8466 818.5909 pos2 961.2841 976.3466 pos3 878.6080 1262.8523 pos4 950.8011 1129.6080 pos5 968.1080 1063.3920 I also have lower (object tl) and upper (object tu) bounds on the confidence intervals as follows: tl: pos1
2012 Oct 12
1
error msg using na.approx "x and index must have the same length"
Below I have written out some simplified data from my dataset. My goal is to interpolate Price based on timestamp. Therefore the closer a Price is in time to another price, the more like that price it will be. I want the interpolations for each St and not across St (St is a factor with levels A, B, and C). Unfortunately, I get error messages from code I wrote. In the end only IDs 10 and 14 will
2012 Dec 02
1
overlapping graphs in logarithmic y-axis
dear useRs, i want to overlap graphs of two matrices in such a way that the y-axis of graph should be "logarithmic" against normal x-axis. i am, unsuccessfully, trying the followings >matplot(mata, log="mata",type = "l", col="red)>lines(mata, log="matb",type = "l", col="yellow") could you please help me out on it?? thanks in
2007 Dec 10
1
moving average and NA values
The S-plus function moving.ave(data, span = 2) calculates the moving average, but it does not have an argument to tell it how to deal with NA values, so it will return NA for all averages as shown below. Is there an R or S moving average function which is able to omit some NA values in the dataset? In the simple sample shown below it would be possible to just remove the rows with NA values. The
2007 Mar 12
1
Can one set box line width within the matplot command?
Hello R users -- I am using matplot to prepare graphs and cannot find a way to use (for example) box(lwd=3) within the matplot command and instead have been setting the box line width after drawing the graph, by using box(lwd = 3). Looking over the ?par options and the matplot() help I do not see a way to set box width within matplot. Is there such an option? Thanks for suggestions,
2010 Nov 29
1
Filling in missing time samples with na.approx
Hi Everyone, I have a some data from a sports gps device like the following: time latitude longitude altitude distance heartrate 1 1277648884 0.304048 -0.793819 260 0.000000 94 2 1277648885 0.304056 -0.793772 262 4.307615 95 3 1277648888 0.304060 -0.793696 263 11.262347 97 4 1277648894 0.304075 -0.793544 263 25.237911 103 5 1277648898
2012 Feb 17
6
convert zoo object to "standard" R object so I can plot and output to csv file
Another newbie question I got the 1 minute spine interpolation and 15 mean aggregation working with many thanks to Gabor Grothendieck using Zoo functions. I got a tip from Hasan Diwan to look at xts but it seemed I would make better progress using code from Gabor. Now I'm having trouble plotting this zoo object. I'm thinking I want a function to "split" the zoo object back to
2008 Apr 17
2
how to connect dots by passing NA
This maybe a silly question. I'm trying to figure out a way to draw a line from a data set which contain NA. Say, I have a set of data as: x <- c(1.1 2.2 NA 4.4 5.5) ; y <- c(1:5) # as x,y of point a, b, c, d, and e. I would like to plot this to a line by using dot-line to connect the two adjacent points before and after the NA, something like: (a)______(b)......(d)______(e) Any help
2006 Sep 11
5
Successive Graphs
Hello! I have written an R script on a Windows platform where I calculate eight result matrices I plot using matplot. I would like to display the resulting plots successively, rather than simultaneously, and I was wondering if anyone could point me in the right direction as to how to do this. The graphs pop up in this manner by default when I run my script in S-PLUS, with tabs separating them so I
2006 Sep 23
1
really irregular time series
I built some reasonably successful tools in a graphical database for reconstructing the developmental turning points for feedback loop driven natural processes. I'm trying to move it to R and am having difficulty with the very basics, i.e. a) defining time series using time as a natural number rather than a place in a table. I was also hoping b) someone might have built some of the
2008 Mar 06
2
replace NA with 9999 in zoo object
This is the same set of data that I have been working with for those in the know. it is a matrix of ~174 columns and ~70,000 rows. I have it as a zoo object, but I could read it in as just a matrix as long as the date time stamp won't be corrupted. here is an example of what a column would look like: 1/1/06 12:00, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5,6 ,7, NA #read in with the
2012 Feb 17
1
time series manipulation what functions are "best"
Newbie question - mechanical engineer trying to learn R I've had success with plotting time series data and even made a heat map using R Graphs Cookbook by Mittal. I have a new problem - I need to align a number of time series data "columns" to the desired regular exact time stamp vector. The target time vector could be finer or more course than the typical time stamp spacing found.
2010 Oct 14
5
Replacing N.A values in a data frame
Hello, I have a data frame as below ... in cases where I have N.A. I want to use an average of the past date and next date .. any help? 13/10/2010 A 23 13/10/2010 B 12 13/10/2010 C 124 14/10/2010 A 43 14/10/2010 B 54 14/10/2010 C 65 15/10/2010 A 43 15/10/2010 B N.A. 15/10/2010 C 65 ---------------------------------------------------------------------------- -------------------------- Thanks
2012 Nov 05
1
Plot 3 lines in one graph
I'm new with R. I want to plot 3 lines in one graph. This is my data: print(x) V1 V2 V3 V41 -4800 25195.73 7415.219 7264.282 -2800 15195.73 5415.219 7264.28 I tried using matplot, but I cannot get exactly what I want. This is what I get, and this is my code: matplot(x[,1],x[,-1],type='b', xlab = "epsilon_h", ylab = "Value2", xlim=
2010 Nov 01
2
Post-processing of approximated irregular time series
Hi all, Issue: I merged two zoo objects (a regular and an irregular). After the merge I used the function 'na.approx' to have also values in the resolution of the regular time series. Problem: After approximation some rows at the beginning or at the end of the zoo objects disappear due to the 'na.approx' algorithm. Now I just want to have all the rows of the regular time series