daily_growth_rate.Rd
Calculate daily growth rate of a cryptocurrency
daily_growth_rate(df, col_name)
A Data frame with date and price data.
a string indicate the column holding daily closing price data.
A dataframe with a new column of daily growth rate.
price_df = data.frame('Date'=c('2022-01-15', '2022-01-16'), 'Close'=c(1.5, 2.5))
daily_growth_rate(price_df, "Close")
#> Date Close daily_growth_rate
#> 1 2022-01-15 1.5 NA
#> 2 2022-01-16 2.5 66.66667