Displaying 4 results from an estimated 4 matches for "198101".
Did you mean:
19801
2012 Aug 03
1
How can I read time series data to create zoo objects if I have two title lines?
...n which I read the time series data from a
csv file and create a zoo object:
x0 <- read.csv(file="CPI.csv", header=TRUE)
time_0<-as.yearmon("1981-01")+(0:371)/12
x0zoo<-zoo(x0, time_0)
The data look like this:
TIME CPI CPI_food CPI_Clothes CPI_House CPI_Rent 198101 62.1 55.34
103.45 65.24 61.43 198102 63.16 56.95 103.21 65.77 61.49 198103 63.44
56.98 103.25 66.44 61.98 198104 63.69 57.41 103.55 66.58 62.15 198105
63.45 56.77 103.44 66.72 62.32 198106 64.05 58.06 103.35 66.81 62.4 198107
64.29 58.53 102.85 66.88 62.5
However, time series data usually...
2006 Jun 04
2
surprising dates
I wonder if this is an intentional feature or an oversight. in some
column summaries or in ifelse operations, apparently I am losing the
date property of my vector.
> a <- c(198012, 198101, 198102)
> b <- a*100+31
> c <- as.Date( as.character(b), "%Y%m%d" )
> summary(c)
Min. 1st Qu. Median Mean 3rd Qu. Max.
"1980-12-31" "1981-01-07" "1981-01-15" "1981-01-15" "1981-01-23"...
2008 Nov 26
0
ts subscripting problem
...197908 197909 197910 197911 197912 198001 198002
1367.484 1366.887 1366.935 1367.034 1366.997 1367.310 1367.041 1366.459
198003 198004 198005 198006 198007 198008 198009 198010
1367.143 1366.553 1366.597 1366.854 1366.814 1366.901 1366.622 1366.669
198011 198012 198101 198102 198103 198104
1365.874 1366.098 1367.141 1366.239 1366.323 1366.388
> plot(irradiance[1:30])
> plot(irradiance)
Error in dn[[2]] : subscript out of bounds
so, if i plot a subset of the data it works fine. but if i try to plot the
whole thing it breaks. the ts object was created...
2009 Mar 09
5
Help
...197910 197911 197912 198001 198002
> 1367.484 1366.887 1366.935 1367.034 1366.997 1367.310 1367.041 1366.459
> 198003 198004 198005 198006 198007 198008 198009 198010
> 1367.143 1366.553 1366.597 1366.854 1366.814 1366.901 1366.622 1366.669
> 198011 198012 198101 198102 198103 198104
> 1365.874 1366.098 1367.141 1366.239 1366.323 1366.388
> > plot(irradiance[1:30])
> > plot(irradiance)
> Error in dn[[2]] : subscript out of bounds
>
> so, if i plot a subset of the data it works fine. but if i try to plot the
> whole thing it...