Skip to content

Commit

Permalink
prepping for CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
spsanderson committed Jun 8, 2022
1 parent c4d6f76 commit d45bc0e
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 57 deletions.
15 changes: 2 additions & 13 deletions R/boilerplate-theta.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@
#' @param .data The data being passed to the function. The time-series object.
#' @param .date_col The column that holds the datetime.
#' @param .value_col The column that has the value
#' @param .rsamp_obj The rsample splits object
#' @param .rsamp_obj The splits object
#' @param .prefix Default is `ts_theta`
#' @param .cv_assess How many observations for assess. See [timetk::time_series_cv()]
#' @param .cv_skip How many observations to skip. See [timetk::time_series_cv()]
#' @param .cv_slice_limit How many slices to return. See [timetk::time_series_cv()]
#' @param .bootstrap_final Not yet implemented.
#'
#' @examples
Expand Down Expand Up @@ -62,19 +59,11 @@
#'

ts_auto_theta <- function(.data, .date_col, .value_col, .rsamp_obj,
.prefix = "ts_theta", .grid_size = 10, .cv_assess = 12,
.cv_skip = 3, .cv_slice_limit = 6,
.bootstrap_final = FALSE){
.prefix = "ts_theta", .bootstrap_final = FALSE){

# Tidyeval ----
date_col_var_expr <- rlang::enquo(.date_col)
value_col_var_expr <- rlang::enquo(.value_col)
sampling_object <- .rsamp_obj

# Cross Validation
cv_assess = as.numeric(.cv_assess)
cv_skip = as.numeric(.cv_skip)
cv_slice = as.numeric(.cv_slice_limit)

# Data and splits
splits <- .rsamp_obj
Expand Down
3 changes: 3 additions & 0 deletions R/ts_functions.R → R/ts-compare-data.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
#' suppressPackageStartupMessages(library(dplyr))
#' suppressPackageStartupMessages(library(timetk))
#'
#' data_tbl <- ts_to_tbl(AirPassengers) %>%
#' select(-index)
#'
#' ts_compare_data(
#' .data = data_tbl
#' , .date_col = date_col
Expand Down
Binary file removed Rplot.png
Binary file not shown.
Binary file removed Rplot01.png
Binary file not shown.
6 changes: 0 additions & 6 deletions man/color_blind.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 1 addition & 11 deletions man/ts_auto_theta.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion man/ts_compare_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions man/ts_scale_color_colorblind.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions man/ts_scale_fill_colorblind.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 3 additions & 14 deletions vignettes/using-tidy-fft.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -71,24 +71,13 @@ Let us now work through a simple example.
Lets get started with some data.

```{r example_data}
suppressPackageStartupMessages(library(healthyR.data))
suppressPackageStartupMessages(library(dplyr))
suppressPackageStartupMessages(library(ggplot2))
suppressPackageStartupMessages(library(timetk))
data_tbl <- healthyR_data%>%
filter(ip_op_flag == 'I') %>%
summarise_by_time(
.date_var = visit_end_date_time,
.by = "month",
value = n()
) %>%
filter_by_time(
.date_var = visit_end_date_time,
.start_date = "2015",
.end_date = "2019"
) %>%
rename(date_col = visit_end_date_time)
data_tbl <- AirPassengers %>%
ts_to_tbl() %>%
select(-index)
```

Now that we have our sample data, let's check it out.
Expand Down

0 comments on commit d45bc0e

Please sign in to comment.