Skip to content

Commit

Permalink
Merge pull request #47 from metasurveyr/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
mauroloprete authored Oct 23, 2024
2 parents 350aa42 + ed7dc02 commit b39a338
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 78 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ Imports:
R6 (>= 2.5.0),
emoji (>= 15.0),
visNetwork (>= 2.0.9),
survey (>= 4.2.1)
survey (>= 4.2.1),
methods
Suggests:
roxygen2 (>= 7.1.2),
testthat (>= 3.0.0),
Expand Down
5 changes: 1 addition & 4 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Generated by roxygen2: do not edit by hand

export(bake_recipe)
export(bake_recipes)
export(bake_step)
export(bake_steps)
export(cat_design)
export(cat_design_type)
Expand All @@ -27,14 +25,12 @@ export(set_use_copy)
export(show_engines)
export(step_compute)
export(step_recode)
export(step_to_env)
export(steps_to_recipe)
export(survey_empty)
export(survey_to_data.table)
export(survey_to_data_frame)
export(survey_to_tibble)
export(use_copy_default)
export(validate_step)
export(view_graph)
export(workflow)
importFrom(R6,R6Class)
Expand Down Expand Up @@ -66,6 +62,7 @@ importFrom(jsonlite,parse_json)
importFrom(jsonlite,read_json)
importFrom(jsonlite,write_json)
importFrom(lifecycle,deprecated)
importFrom(methods,is)
importFrom(stats,coef)
importFrom(survey,SE)
importFrom(survey,cv)
Expand Down
22 changes: 19 additions & 3 deletions R/Step.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ Step <- R6Class("Step",

#' Step to environment
#' @param step A Step object
#' @export
#' @return An environment
#' @keywords Surveymethods
#' @noRd
#' @keywords internal

step_to_env <- function(step) {
args_function_step <- names(formals(step$type))
Expand All @@ -46,7 +49,11 @@ step_to_env <- function(step) {
#' Validate step
#' @param svy A Survey object
#' @param step A Step object
#' @export
#' @keywords Surveymethods
#' @keywords Steps
#' @keywords Validate
#' @noRd
#' @keywords internal

validate_step <- function(svy, step) {
names_svy <- names(svy$data)
Expand All @@ -70,9 +77,15 @@ validate_step <- function(svy, step) {


#' Bake step
#' @export
#' @param svy A Survey object
#' @param step A Step object
#' @return A Survey object
#' @keywords Surveymethods
#' @keywords Steps
#' @keywords Bake
#' @keywords Survey
#' @noRd
#' @keywords internal

bake_step <- function(svy, step) {

Expand Down Expand Up @@ -120,6 +133,9 @@ bake_step <- function(svy, step) {

#' Bake steps
#' @export
#' @keywords Surveymethods
#' @keywords Steps
#' @keywords Bake
#' @param svy A Survey object

bake_steps <- function(svy) {
Expand Down
3 changes: 1 addition & 2 deletions R/steps.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#' @importFrom data.table copy
#' @importFrom methods is
compute <- function(svy, ..., .by = NULL, use_copy = use_copy_default(), lazy = lazy_default()) {


Expand Down Expand Up @@ -68,8 +69,6 @@ recode <- function(svy, new_var, ..., .default = NA_character_, ordered = FALSE,

}

assign("exprs_recode", .exprs, envir = .GlobalEnv)

.labels <- c(
.default,
unique(
Expand Down
22 changes: 0 additions & 22 deletions man/bake_recipe.Rd

This file was deleted.

16 changes: 0 additions & 16 deletions man/bake_step.Rd

This file was deleted.

3 changes: 3 additions & 0 deletions man/bake_steps.Rd

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

14 changes: 0 additions & 14 deletions man/step_to_env.Rd

This file was deleted.

16 changes: 0 additions & 16 deletions man/validate_step.Rd

This file was deleted.

0 comments on commit b39a338

Please sign in to comment.