Displaying 20 results from an estimated 10000 matches similar to: "Changing the frequency of time series"
2012 Jan 29
2
Data Structure to Code
Given:
data(AirPassengers)
I get a ts data structure AirPassengers in the workspace.
How can I generate the code that can create that structure? That is, given an example of a data structure, is there a way to generate the code that can greate that structure?
Alternatively, is there a reference that provides a list of dta structures together with a full list of theor respective attributes?
2012 Jan 18
5
Executable expressions
Given
a<-"c(1,2,3,4,5)"
How can I evaluate the variable a to return a (numeric) vector comprising of 1,2,3,4,5? Thanks.
[[alternative HTML version deleted]]
2003 Oct 22
2
High frequency time-series
Having to collect hourly electricity loads and quarter-of-an-hour electricity production data for some years I think that the tidiest way of doing it is to resort to ts but I don't know how to define such a frequency starting from a set date.
Leafing through r-help mail archives I've found this *ALMOST* satisfactory message:
==========================================================
2012 Jan 21
2
How to identify data structure?
data(AirPassengers) brings AirPassengers into the workspace. How can I idenfity what the structure of AirPassengers is? Is it a data.frame, a table etc. etc.
[[alternative HTML version deleted]]
2010 Jan 30
2
question about time series objects
Hi All,
I have a very simple question about a time series object: how to access
values for a particular year and quarter (say)?
Suppose, following
http://www.stat.pitt.edu/stoffer/tsa2/R_time_series_quick_fix.htm
I have read in data as a time series; here is how it looks.
* Qtr1 Qtr2 Qtr3 Qtr4
1960 0.71 0.63 0.85 0.44
1961 0.61 0.69 0.92 0.55
. . . . .
2012 Jan 19
2
What is a 'closure'?
The "R Language Definition" at http://cran.r-project.org/doc/manuals/R-lang.html states in the following section
4.3.2 Argument matching
This subsection applies to closures but not to primitive functions.
What are 'closures'?
[[alternative HTML version deleted]]
2012 Jan 16
2
R for Windows: Is there a function/package that enables Win32 API Calls?
I am looking for a means to call Win32 API calls from R for Windows. Is that possible?
Thanks.
[[alternative HTML version deleted]]
2012 Jan 22
2
R interactive = FALSE
I haven't been able to find an example of using R with interactive = FALSE.
How do I start R such that
1. it loads a workspace
2. then starts execution with a function (in that workspace) that I choose
3. exits on completion
Thanks.
[[alternative HTML version deleted]]
2012 Mar 08
2
Classification by range
Given
studentNumbers<-10;
subjEnglish<-sample(-1:100,studentNumbers,replace=TRUE);
when subEnglish <=0, 'U'
<=39, 'F'
<=49 'D'
<=59, 'C'
<=69, 'B'
<=79,'A'
<=100 'A+'
I
2012 Mar 18
2
Removing session variables
If I create a data.frame using session variables as follows:
classResults<-data.frame(subjEnglish,gradeEnglish,subjFrench,gradeFrench,row.names=studentName)
How can I remove the variables? I tried
> rm(names(classResults))
Error in rm(names(classResults)) :
... must contain names or character strings
Also, how can I include the row.names variable. I tried
> names(classResults)
2012 Jan 27
2
How to write the entire session to file?
savehistory writes all the executed lines from the session.
How can I write everything (executed lines and output) from the active session to a file?
Using Edit | Select All then Edit Copy, I can copy everything to the clipboard and write the whole thing to a file manually.
If I just used the clipboard, I can paste the whole content into another edittor (for documentation). Is there a way to
2010 Jul 03
2
Change the frequency of a ts?
I'm trying to convert a column of a table into a ts object. The data is
monthly, so I want the ts frequency to be 12.
I did this ...
> filings.ts = as.ts(Filings.100K, frequency=12)
> filings.ts
Time Series:
Start = 1
End = 311
Frequency = 1
[1] 246.9336 305.6789 ... ...
> tsp(filings.ts)
[1] 1 311 1
> tsp(filings.ts) <- c(1,311,12)
Error in attr(x, "tsp")
2017 Oct 06
2
Time series: xts/zoo object at annual (yearly) frequency
Hi,
I'd like to make a time series at an annual frequency.
> a<-xts(x=c(2,4,5), order.by=c("1991","1992","1993"))
Error in xts(x = c(2, 4, 5), order.by = c("1991", "1992", "1993")) :
order.by requires an appropriate time-based object
> a<-xts(x=c(2,4,5), order.by=1991:1993)
Error in xts(x = c(2, 4, 5), order.by =
2010 Mar 18
1
Regression of a time series on its Quarters
# Dear List,
# I want to characterize a time series according to its Quarter components.
# My data ("a.ts":
http://docs.google.com/View?id=dfvvwzr2_478cr9k4cdb)? look like:
#???????????????? Qtr1????????? Qtr2????????? Qtr3????????? Qtr4
#?? 1948 -0.0714961837? 0.0101747827? 0.0654816569 -0.0227830729
#?? 1949 -0.1175517556? 0.1151378692? 0.1015777858 -0.1971535900
#?? 1950?
2002 Oct 01
1
High Frequency Time Series
Dear R People:
I have a weekly time series. How do I put this into the
ts command, please?
That is, what do I use for frequency, please?
R version 1.5.1 for Windows.
Thanks in advance.
Sincerely,
Erin
mailto: hodgess at uhddx01.dt.uh.edu
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
2013 Oct 23
2
Multivariate time series in R 3 vs R 2
Hello!
Recently I got report that my package mar1s doesn't pass checks any more on
R 3.0.2. I started to investigate and found the following difference in
multivariate time series handling in R 3.0.2 compared to R 2 (I've checked
on 2.14.0).
Suppose I wish to calculate seasonal component for time series. In case of
multivariate time series, I wish to process each column independently.
2012 Feb 20
3
Confused: Inconsistent result?
This is copy & paste from my session:
> xyz<-as.vector(c(ls(),as.matrix(lapply(ls(),class))))
> dim(xyz)<-c(length(xyz)/2,2)
>
> allobj<-function(){
+ xyz<-as.vector(c(ls(),as.matrix(lapply(ls(),class))));
+ dim(xyz)<-c(length(xyz)/2,2);
+ return(xyz)
+ }
> xyz
[,1] [,2]
[1,] "a" "character"
[2,]
2007 Jul 25
3
aggregate.ts
Consider the following scrap of code:
> x<- ts(1:50,start=c(1,11),freq=12)
> y <- aggregate(x,nfreq=4)
> c(y)
[1] 6 15 24 33 42 51 60 69 78 87 96 105 114 123 132 141
> y
Error in rep.int("", start.pad) : invalid number of copies in rep.int()
> tsp(y)
[1] 1.833333 5.583333 4.000000
So we can aggregate into quarters, but we cannot print it using
2007 Jul 25
3
aggregate.ts
Consider the following scrap of code:
> x<- ts(1:50,start=c(1,11),freq=12)
> y <- aggregate(x,nfreq=4)
> c(y)
[1] 6 15 24 33 42 51 60 69 78 87 96 105 114 123 132 141
> y
Error in rep.int("", start.pad) : invalid number of copies in rep.int()
> tsp(y)
[1] 1.833333 5.583333 4.000000
So we can aggregate into quarters, but we cannot print it using
2010 Jan 08
2
time series analysis for a time series without a regular frequency
Hello,
I am trying to conduct a time series analysis on historic hydrologic data,
but I cannot coerce it into class ts because it does not have regular
sampling intervals (some years have 20 samples, other have 8). Specifically
I am trying to perform a CUSUM or or other step change detection, but the
packages all seem to require data as ts.
Is there a way to coerce my data into ts while