Description Usage Arguments Value Examples
View source: R/mg_time_series_prep.R
Takes hydraulic head time series datafram and calculates mean values and dates for a certain timespan. df,date_column_name,value_column_name,timespan
1 2 3 4 5 6 7 | mg_function_time_series_preparation(
df,
date_column_name,
value_column_name,
id_column_name,
timespan_weeks
)
|
df |
dataframe which contains the value and date column |
date_column_name |
column name of the date column (should be format date) |
value_column_name |
column name1of the value column (numeric format) |
id_column_name |
column name of identifier column (e.g. name of Grundwasssermessstelle) (character format) |
timespan_weeks |
number of weeks for which mean value and mean date are calculated |
input dataframe with 4 new columns, timespan_weeks: mean isoweek of timespan (e.g. isoweek 49-51 –> 50) timespan_weeks_label: character column showing the isoweeks e.g. '49-51' mean_value: mean value in time span mean_date: mean date in time span (format date)
1 2 3 4 | test<- mg_function_time_series_preparation(df = wasserstand_projekt,
date_column_name = "datum",
value_column_name = "mess_wert",
timespan = 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.