export_with_safe_date: Exports tsibble to csv correctly

Description Usage Arguments Details Value Examples

View source: R/watchdog.R

Description

Exports tsibble to csv correctly

Usage

1

Arguments

x

tibble or tsibble with date column

file

filename

Details

Exports tsibble to csv correctly The problem is that simple rio::export will transform monthly dates into strange integers.

Value

file exporting code

Examples

1
2
3
4
x = ts(1:10, frequency = 12, start = c(2000, 1))
x_tsi = tsibble::as_tsibble(x)
x_tsi = dplyr::rename(x_tsi, date = index)
export_with_safe_date(x_tsi, paste0(tempdir(), "/data.csv"))

kassandra-ru/kassandr documentation built on Jan. 1, 2022, 7:39 a.m.