Skip to content

Help with diff(sqrt()) function in terms of time series

3 messages · Addi Wei, Dieter Menne, PIKAL Petr

#
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)))
Time 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.
#
Addi Wei wrote:
Please post str(year10).

Dieter
1 day later
#
Hi

r-help-bounces at r-project.org napsal dne 05.12.2010 00:19:17:
Probably year10 is factor. Make it numeric.

Regards
Petr
following
previous
http://r.789695.n4.nabble.com/Help-with-diff-
http://www.R-project.org/posting-guide.html