similar to: plotting NAs

Displaying 20 results from an estimated 90000 matches similar to: "plotting NAs"

2010 Apr 12
1
N'th of month working day problem
Dear Gabor, Thanks for your reply. however: > tail(DJd) ^DJI.Close 2010-04-01 10927.07 2010-04-05 10973.55 2010-04-06 10969.99 2010-04-07 10897.52 2010-04-08 10927.07 *2010-04-09 10997.35* > tail(ag) 2009-11-30 10344.84 2009-12-31 10428.05 2010-01-31 10067.33 2010-02-28 10325.26 2010-03-31 10856.63 *2010-04-30 10997.35 * It seems the script "makes up"
2012 Apr 23
2
subset daily to monthly in a zoo or xts
Dear R users, I want to subset a daily zoo series according to its month, find % of "NA" in each month. I am finding it difficult to subset the daily dataset into monthly for the given operation.I am planning to do this for a huge dataset. Thanks in advance. Regards Vikram [[alternative HTML version deleted]]
2008 Mar 13
3
zoo object: replace NAs from another zoo object
Hello, I have two zoo objects, new and old, indexed by chron objects. Their structure is like this: (05/25/06 00:00:00) NA NA NA (05/25/06 00:02:00) 948.20 24.198 0 (05/25/06 00:04:00) 948.26 20.640 0 (05/25/06 00:06:00) 948.37 19.653 0 (05/25/06 00:08:00) 948.48 19.135 0 (05/25/06 00:10:00) 948.54 22.510 0 (05/25/06 00:12:00) 948.55 27.175 0 (05/25/06 00:14:00) 948.46
2009 Jan 23
1
extract certain months toyears (zoo)
Dear useRs and developeRs, In my diploma thesis I work with a daily time series of glacier runoff data. I did already aggregate them to monthly means etc. Now i want to use just the summer values (I am indecisive by now what that means, but let's make it easy and use months like June). Is there a way to extract the data off this zoo into another zoo with frequency=1 ? Do you have
2008 Sep 22
1
as.day() Function (zoo question)
I am was going to look at the as.yearmon function in the zoo package and write a as.day function to aggregate a time series of 96 observations per day into the mean for each day, but I don't know how to look at the code so that I can convert it into something I can use. On top of that I believe that it is probably an S3 method and I haven't quite gotten that far in my programming
2009 Dec 22
1
Using zoo() to aggregate daily data to monthly means
I am trying to get monthly means for a daily data series using zoo(). I have found an odd problem, that seems to be caused by zoo()'s handling of leap years. Here's my R script with 2 methods (freq=365, 366) for aggregating the daily data to monthly series: library(zoo) J_link <- "http://www.ijis.iarc.uaf.edu/seaice/extent/plot.csv" JAXA_data <- read.table(J_link,
2012 Feb 21
1
Questions on Data reading using zoo package
Hello, I try to handle the data using read.csv , zoo and aggregate functions. The data contains NA values. After aggregating monthly data into quarterly data, all data become NA. Is it because I don't properly aggregate the data in the presence of NAs? What can I do? Another problem is that the date in month is presented in Chinese (My OS is in Chinese.) How can I set the default
2010 Jul 23
1
Error produced by read.zoo: "bad entries"
Hello! I have a data set similar to the data set "monthly" in the example below: monthly<-data.frame(month=c(20090301,20090401,20090501,20100301,20100401,20090301,20090401,20090501,20100301,20100401),monthly.value=c(100,200,300,101,201,10,20,30,11,21),market=c("Market A","Market A", "Market A","Market A", "Market A","Market
2006 Oct 26
1
Up- or downsampling time series in R
Hi I have data that is sampled (in time) with a certain frequency and I would like to express this time series as a time series of a higher (or lower) frequency with the newly added time points being filled in with NA, 0, or perhaps interpolated. My data might be regularly or irregularly spaced. For example, I might have quarterly data that I would like to handle as a monthly time series with
2008 Jul 28
3
Fill in NA values in vector with previous character/factor
I have a vector of data (species names) interspersed with NA values and I want a function to "fill in the blanks", replacing NA values with whatever the last species name was. For example the vector: "A","B",NA,NA,"C",NA,NA,NA,NA,"D",NA,NA. should evaluate to: "A" "B" "B" "B" "C"
2008 Mar 30
2
convert weekly time series data to monthly
I have weekly time series data with year, month, day, and price variables. The input data set for the weekly series takes the following form: Year month day price 1990 8 20 119.1 1990 8 27 124.5 1990 9 3 124.2 1990 9 10 125.2 1990 9 17 126.6 1990 9 24 127.2 1990 10 1 132.1 1990 10 8 133.3 1990 10 15 133.9 1990 10 22 134.5 1990 10 29 133.9 .. ... ... ... ... ... .... .... 2008 3 3 313.7 2008
2010 Jan 01
1
Chainging monthly data to daily data
Hi, I have a zoo object with monthly frequency : library(zoo) dat <- zooreg(rnorm(50), as.yearmon("2000-01-01"), frequency=12) Now I want to make a zoo object with daily frequency from "dat" wherein value for a each day for a particular month will be value of "dat" at that particular month. Is there any easy way to do that? Thanks, -- View this message in
2009 Feb 26
2
Importing zoo object ("index contains NAs")
Dear list, I have an irregular time series saved and exported as a zoo object. What is the trick to force zoo to ignore the missing dates when reading it back in? Thanks. > str(g) ?zoo? series from 1948-11-02 to 2012-11-06 Data: num [1:14881, 1:8] 1 0 0 0 0 0 0 0 0 0 ... - attr(*, "dimnames")=List of 2 ..$ : NULL ..$ : chr [1:8] "session" "midterm"
2008 Nov 04
2
ggplot & annotating charts
Dear "R-listers" I've been trying to figure out how to annotate charts in ggplot (ie add text to line charts, highlighted boxes etc). By and large, I can get close to what i want with base graphics, but would ideally like to use ggplot whenever possible (additionally, i would like to add text labels automatically to the chart). The code is below I suspect I need to use geom_rect,
2008 Mar 06
1
can't merge zoo ojects and convert to ts (been trying for 2 days)
I'm stuck, but am sure it can be done I just don't understand how. I have data in an irregular timeseries. I want to be able to use stl to visualise the data (see seasonal parts etc), so I need to change to regular series of class ts (I think). I am using 2 zoo objects one is regular and the other is my irregular data. I am then merging to create the object I want but when I try to change
2009 Jun 23
5
Merging Irregular Time Series With NAs
Hi I have two irregular time series, which are of different lengths and being and end at different times. For the common subset of time that they both span, they should have the same values, but the values may occur at slightly different time intervals. I am trying to "line up" the identical values and reconcile them. I have merged the two series into a zoo object which looks
2010 Nov 23
2
Plot two zoo object with different indexes
Dear R community, I have the following two zoo objects: MONTHLY CPI > plot(z) > par("usr") [1] 1977.76333 2011.15333 70.39856 227.03744 > z=zooreg(cpius$Value,as.yearmon("1979-11"),frequency=12) > str(z) ?zooreg? series from Nov 1979 to Oct 2010 Data: num [1:372] 76.2 77 77.8 78.5 79.5 80.3 81.1 82 82 82.6 ... Index: Class 'yearmon' num [1:372]
2011 Apr 03
1
R-project: plot 2 zoo objects (price series) that have some date mis-matches
I have 2 zoo objects - 1) Interest rate spread between 10-YR-US-Treasury and 2-YR-US-Treasury (object name = sprd) 2) S&P 500 index (object name = spy) > str(spy) ?zoo? series from 1976-06-01 to 2011-03-31 Data: num [1:8791] 99.8 100.2 100.1 99.2 98.6 ... Index: Class 'Date' num [1:8791] 2343 2344 2345 2346 2349 ... > str(sprd) ?zoo? series from 1976-06-01 to 2011-03-31
2009 Apr 27
2
series at low freq expanded into high freq
Folks, If I have a series mm of, say, monthly observations, and a series dd of daily dates, what's a good way of expanding mm such that corresponding to each day in dd within the corresponding month in mm, the values of mm are repeated? So e.g., if I have mm: mm <- c(15, 10, 12, 13, 11) names(mm)<-c("Nov 2008", "Dec 2008", "Jan 2009", "Feb
2009 Oct 07
1
Formatting outputs:(chronological object)
Hello everyone, I have a data generated in a way similar to the following library(chron);library(zoo) date<- seq(as.Date("1990-01-01"),, as.Date("2000-12-31"), by = 1) obs<- zoo(rnorm(length(date), mean = 10, sd = 2.5), order.by = date) monthly<- function(date) as.Date(as.yearmon(Date)) result<- data.frame ( Date = obs = aggregate(obs, monthly, sum)) Now, I want