Addi Wei
2010-Dec-04 23:19 UTC
[R] Help with diff(sqrt()) function in terms of time series
year1 is the time series data set below 11.64 11.50 11.49 11.16 11.15 11.37 11.37 11.57 11.83 11.87 11.85 11.92 11.77 11.71 11.57 11.24 11.27 11.33 11.17 ................. With a total of 1304 rows of data. When I try to run the code: diff(sqrt(year10)) I get the response: "data frame with 0 columns and 1304 rows" and then I subsequently try to convert my data into a time series with the following function: yearstate = ts(diff(sqrt(year10)))> yearstateTime Series: Start = 1 End = 1304 Frequency = 1 1 2 3 4 5 ............all the way to 1304. So, it basically erased all of my previous data, and the data are just row numbers all the way to 1304... Any help would be appreciated. I tried my best to produce actual code. -- View this message in context: http://r.789695.n4.nabble.com/Help-with-diff-sqrt-function-in-terms-of-time-series-tp3072877p3072877.html Sent from the R help mailing list archive at Nabble.com.
Dieter Menne
2010-Dec-05 08:49 UTC
[R] Help with diff(sqrt()) function in terms of time series
Addi Wei wrote:> > year10 is the time series data set below > 11.64 > 11.50 > 11.49 > > ...I tried my best to produce actual code. >Please post str(year10). Dieter -- View this message in context: http://r.789695.n4.nabble.com/Help-with-diff-sqrt-function-in-terms-of-time-series-tp3072877p3073097.html Sent from the R help mailing list archive at Nabble.com.
Petr PIKAL
2010-Dec-06 09:35 UTC
[R] Odp: Help with diff(sqrt()) function in terms of time series
Hi r-help-bounces at r-project.org napsal dne 05.12.2010 00:19:17:> > year1 is the time series data set below > 11.64 > 11.50 > 11.49 > 11.16 > 11.15 > 11.37 > 11.37 > 11.57 > 11.83 > 11.87 > 11.85 > 11.92 > 11.77 > 11.71 > 11.57 > 11.24 > 11.27 > 11.33 > 11.17 > ................. > > With a total of 1304 rows of data. > > When I try to run the code: > diff(sqrt(year10))Probably year10 is factor. Make it numeric. Regards Petr> I get the response: "data frame with 0 columns and 1304 rows" and then I > subsequently try to convert my data into a time series with thefollowing> function: > yearstate = ts(diff(sqrt(year10))) > > yearstate > Time Series: > Start = 1 > End = 1304 > Frequency = 1 > > 1 > 2 > 3 > 4 > 5 > ............all the way to 1304. So, it basically erased all of myprevious> data, and the data are just row numbers all the way to 1304... Any help > would be appreciated. I tried my best to produce actual code. > -- > View this message in context:http://r.789695.n4.nabble.com/Help-with-diff-> sqrt-function-in-terms-of-time-series-tp3072877p3072877.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.