ts_pc: First Differences and Percentage Change Rates

Description Usage Arguments Value Examples

View source: R/ts_pc.R

Description

ts_pcy and ts_diffy calculate the percentage change rate and the difference compared to the previous period, ts_pcy and ts_diffy calculate the percentage change rate compared to the same period of the previous year. ts_pca calculates annualized percentage change rates compared to the previous period.

Usage

1
2
3
4
5
6
7
8
9

Arguments

x

ts-boxable time series, an object of class ts, xts, zoo, data.frame, data.table, tbl, tbl_ts, tbl_time, tis, irts or timeSeries.

Value

a ts-boxable time series, with the same class as the input.

Examples

1
2
3
4
5

Example output

Error in file(con, "r") : cannot open the connection
In addition: Warning message:
In file(con, "r") : cannot open file '/etc/timezone': Permission denied
      fdeaths mdeaths
[67,]     -24     -19
[68,]     -26     -81
[69,]      14     -35
[70,]      18     141
[71,]      76     213
[72,]      87      47
        fdeaths   mdeaths
[67,] -5.594406 -1.767442
[68,] -6.419753 -7.670455
[69,]  3.693931 -3.589744
[70,]  4.580153 15.000000
[71,] 18.491484 19.703978
[72,] 17.864476  3.632148
        fdeaths   mdeaths
[67,] -49.88442 -19.26433
[68,] -54.89650 -61.62147
[69,]  54.53971 -35.51201
[70,]  71.15566 435.02501
[71,] 666.02981 765.57158
[72,] 618.77866  53.43838
         fdeaths    mdeaths
[67,]  -6.032483  -3.825137
[68,]   4.696133  -2.888446
[69,]   1.550388  -3.092784
[70,]  -4.418605  -5.175439
[71,]  14.588235  16.576577
[72,] -15.463918 -25.993377
      fdeaths mdeaths
[67,]     -26     -42
[68,]      17     -29
[69,]       6     -30
[70,]     -19     -59
[71,]      62     184
[72,]    -105    -471

tsbox documentation built on April 30, 2020, 1:05 a.m.