similar to: zoo object won't plot

Displaying 20 results from an estimated 500 matches similar to: "zoo object won't plot"

2008 Jul 15
1
code reduction (if anyone feels like it)
# I am sure that I could be more efficient than this but how? Thanks in advance. #GPS in Decimal Degrees in the form longitude latitude RM215 <- matrix(c(-82.1461363, 33.5959109), nrow=1) SC <- matrix(c(-82.025888, 33.606454), nrow=1) RM202 <- matrix(c(-81.9906723, 33.5027653), nrow=1) RM198 <- matrix(c(-81.926823, 33.4634678), nrow=1) HC <- matrix(c(-81.920505, 33.46192), nrow=1)
2008 Apr 21
1
Adding number of non-NAs to boxplot
boxplot(x[,c(2,15,28,41,54,67,80,93,106)], ylab="mg/s", names=c("RM215", "RM202", "RM198", "RM190", "RM185", "RM179", "RM148", "RM119", "RM61")) this is the code I am using to make a standard box plot. Is there a way to get the number of NA observations plotted onto the graph easily. I can always
2011 Jan 06
1
[zoo] - Individual zoo or data frames from non-continuous zoo series
#Is there a way to break the below zoo object into non-NA data frames algorithmically #this is a small example of a much larger problem. #It is really no even necessary to have the continuous chunks #end up as zoo objects but it is important to have them end #up with the index column. #thanks for all of your help in advance, and #if you need anything else please let me know library(zoo) ind.
2008 Mar 15
1
feeding merge.zoo a vector containing the names of zoo objects?
Hi, the snippet of code below works, but I would like to know how to feed the function merge.zoo the contents of CADstocknames rather than having to hard code it into the merge.zoo command. I think I must be missing something simple, but I cannot for the life of me figure it out. Thanks in advance for any enlightenment offered. library(zoo) CADstocknames <-
2010 May 17
1
Isn't aggreate.zoo supposed to work with POSIXct (zoo/TTR/xts issue)?
library(xts) library(TTR) ndx = getYahooData("^NDX") aa = ndx$Close bb = aggregate(aa, as.yearweek, tail, 1) The last operation takes forever, and then the bb dates are messed up. The following produces the desired result: time(aa) = as.Date(time(aa)) bb = aggregate(aa, as.yearweek, tail, 1) The index of ndx and aa is of POSIXct (as reported by is(time(ndx))) , which apparently
2010 Aug 01
1
aggregating a daily zoo object to a weekly zoo object
Dear R People: I'm trying to convert a daily zoo object to a weekly zoo object: xdate <- seq(as.Date("2002-01-01"),as.Date("2010-07-10"),by="day") library(zoo) length(xdate) xt <- zoo(rnorm(3113),order=xdate) xdat2 <- seq(index(xt)[1],index(xt)[3113],by="week") xt.w <- aggregate(xt,by=xdat2,mean) Error: length(time(x)) ==
2010 Nov 26
0
Help on converting a daily zoo to a weekly zoo
Dear R-gurus: I want to convert a zoo object of daily stock prices to a weekly one, based on the following 4 steps. 1. No problem in creating weekly data using Wednesday Obs. wed.index &lt;- ( weekdays(index(daily)) == "Wed" ) week.dat &lt;- daily[wed.index] > week.dat A000010 A000020 A000030 A000040 A000050 A000060 2000-01-05 3925 NA 3950 6350 21717 836 2000-01-12
2008 Jul 08
1
making zoo objects with zoo without format argument?
#this is a subset of a larger data frame and I am okay with subsetting it as there are redundant time stamps, but I would like to create a zoo object out of this and I am having a hard #time figuring out how to do this the date structure is year and then month x <- structure(list(Yearmonth = structure(c(12L, 24L, 1L, 13L, 14L, 3L, 15L, 4L, 16L, 5L, 17L, 6L, 18L, 7L, 19L, 8L, 20L, 9L, 21L,
2012 May 28
2
zoo: variable gets modified at making zoo object
I'm doing: > alyL32007z <- zoo(alyL32007,alyL32007$time) > range(time(alyL32007z)) [1] "2007-01-01 00:00:00 UTC" "2007-12-31 23:30:00 UTC" But then, while the original variable is: > summary(alyL32007$NEE_st) Min. 1st Qu. Median Mean 3rd Qu. Max. NA's -15.340 -1.615 -0.054 -0.814 0.750 8.965 11124 the variable within the zoo object
2012 Dec 05
1
NAMESPACE problem: import(zoo) but 'zoo' could not be loaded
Hello: I'm having problems creating a real NAMESPACE to replace the pro forma one in the fda package on R-Forge. "R CMD check" complains, "Error: package 'zoo' could not be loaded ... there is no package called 'zoo'"; see below. I get this both with and without "import(zoo)" in NAMESPACE. Suggestions? Thanks,
2008 Sep 02
1
R Newbie: quantmod and zoo: Warning in rbind.zoo(...) : column names differ
Hello; I am trying following but getting a warning message : Warning in rbind.zoo(...) : column names differ, no matter whatever I do. Also I do not want to specify column names manually, since I am just writing a wrapper function around getSymbols to get chunks of data from various sources - oanda, dividends etc. I tried giving col.names = T/F, header = T/F and skip = 1 but no help. I think
2009 Sep 27
2
zoo: merging aggregated zoo-objects fails
Dear all, I have several text files looking like this: 9063032 19700201 22:00 174.067 9063032 19700201 23:00 174.076 9063032 19700202 00:00 174.085 9063032 19700202 01:00 174.091 9063032 19700202 02:00 174.094 9063032 19700202 03:00 174.091 9063032 19700202 04:00 174.082 9063032 19700202 05:00 174.079 And I run this loop: for (j in 1:nr.of.files) { #Import: DF <-
2012 Aug 09
1
Zoo object problem: problem when I attempt to create a zoo object of only one column
Hi, Part of my program is to calculate the number of time series in a zoo object. It works well if it has more than one time series, but it fails if it has only one. How can I access the number of column (i.e. the number of time series) when I have only one column? Why is the number of an object of only one object "NULL"? It should be one, shouldn't it? (The following example
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
2011 Mar 02
1
Create a zoo/xts Time Series with Millisecond jumps
Is there a easy way to create the time index for a zoo/xts object for every 100 milliseconds. eg. time Index would be: 10:00:00:100 10:00:00:200 10:00:00:300 10:00:00:400 I am looking to build an empty zoo/xts object with time index from 10am to 3pm, index jumps by 100ms each row. Thanks, Chris -- View this message in context:
2010 Sep 16
1
How do I create a plotable zoo object based on weekly data?
Dear readers, The problem is simple: I have weekly time series data with a maximum week number of (52,53,52,52) in (2008,2009,2010,2011) respectively. That means I have a dataset looking like this: 2008-01 value 2008-02 value . . 2011-52 value And I would like to turn that data into a plotable zoo object. Now a simple example containing 4 data points, each being on the December 28th, would be:
2012 May 04
1
zoo package; a question on as.yearmon and as.yearqtr
Hello, In zoo package, if I would like the time frame to be 1981M01 to 1982M12, then I code time_0<-as.yearmon("1981-01")+(0:23)/12 However, if the time frame of interest becomes 1981M01 to 2011M12, it is relatively hard to calculate the number of months. Is there any faster way to do it? Thanks, miao [[alternative HTML version deleted]]
2012 Feb 17
0
error with read.zoo, "Error in xy.coords(x, y) : (list) object cannot be coerced to type 'double'
I'm now trying to read.zoo in a rather long txt file with two columns: date/time and value in kW e.g. 432.2189 The read.zoo function finally ran without errors but not sure it is correct. I took the header off, and put in commas and added a " at the beginning and " at the end. z=read.zoo("Kevin-0-comma-ITPower.txt","%m/%d/%Y
2012 Sep 05
2
cex.lab ignored in plot.zoo for multiple plots
Hello everyone, a problem with the plot.zoo function. In the parameters of the function, cex.lab is ignored. I tried to reduce the size of the yaxis labels by at least 50%. ------------------ Example: sample <- as.zoo(EuStockMarkets) par(las=1) plot.zoo(sample, plot.type="multiple", main="Time Series", xlab="Date", yaxt="n", cex.lab=0.5,
2006 May 08
1
Help on zoo and datetime series
Hello, i would like to import this txt file: Giorno;PM10 2006-01-01 10:10;10.3 2006-02-02 20:22;50.3 2006-03-03 23:33;20.1 ......... As it's an irregular time series i use zoo as follow: require(zoo) z <- read.table("c:\\1.csv", sep=";", na.strings="-999", header=TRUE) q <- zoo(z$PM10, strptime(as.character(z$Giorno),"%Y-%m-%d %H:%M")) At this