Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pull from main #128

7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
Package: travelSurveyTools
Title: travelSurveyTools
Version: 2.3.2
Version: 2.3.3
Authors@R: c(
person("RSG", "Inc.", , "rsg@rsginc.com", role = c("aut", "cre")),
person("Ashley", "Asmus", , "ashley.asmus@rsginc.com", role = "aut"),
person("Erika", "Redding", , "erika.redding@rsginc.com", role = "aut"),
person("Jacob", "Moore", , "jacob.moore@rsginc.com", role = "aut"),
person("James", "Clark", , "james.clark@rsginc.com", role = "aut")
person("James", "Clark", , "james.clark@rsginc.com", role = "aut"),
person("Matt", "Landis", , "matt.landis@rsginc.com", role = "aut")
)
Description: An R Package To Make Working With And Summarizing Household Travel Survey Data Easier.
License: GPL (>= 3)
Expand All @@ -30,7 +31,7 @@ Suggests:
tigris
Config/testthat/edition: 3
Depends:
R (>= 2.10)
R (>= 4.1)
LazyData: true
VignetteBuilder: knitr
URL: https://github.com/RSGInc/travelSurveyTools
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# travelSurveyTools 2.3.3

- Small updates to DESCRIPTION

# travelSurveyTools 2.3.2

- Additional steps to ensure anonymity of test data
Expand Down
2 changes: 1 addition & 1 deletion R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
#' A data frame with 55 rows and 10 columns:
#' \describe{
#' \item{variable}{Name of the variable}
#' \item{is_checkbox}{The variable is a 'Select all that Apply' question}
#' \item{is_checkbox}{The variable is a multiple response categorical variable question}
#' \item{hh}{The variable exists in the hh table}
#' \item{person}{The variable exists in the person table}
#' \item{day}{The variable exists in the day table}
Expand Down
6 changes: 3 additions & 3 deletions R/hts_summary_cat.R
Original file line number Diff line number Diff line change
Expand Up @@ -228,14 +228,14 @@ hts_summary_cat = function(prepped_dt,
strataname = strataname)

wtd_summary =
so %>%
group_by_at(unlist(groupbyvars)) %>%
so |>
group_by_at(unlist(groupbyvars)) |>
summarize(
count = length(get(summarize_var)),
prop = srvyr::survey_prop(proportion = FALSE,
vartype = "se"),
est = survey_total(vartype = "se")
) %>%
) |>
setDT()

} else if (!se) {
Expand Down
12 changes: 6 additions & 6 deletions R/hts_summary_num.R
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ hts_summary_num = function(prepped_dt,

# Calculate survey proportions:
num_summary_wttype =
num_so_ls[[wt_type]] %>%
group_by_at(unlist(summarize_by)) %>%
num_so_ls[[wt_type]] |>
group_by_at(unlist(summarize_by)) |>
summarize(
count = length(get(summarize_var)),
min = min(get(summarize_var), na.rm = TRUE),
max = max(get(summarize_var), na.rm = TRUE),
mean = survey_mean(get(summarize_var), vartype = variance_type, na.rm = TRUE),
median = survey_median(get(summarize_var), vartype = NULL, na.rm = TRUE)
) %>%
) |>
setDT()

num_summary_ls[[wt_type]] = num_summary_wttype
Expand All @@ -107,15 +107,15 @@ hts_summary_num = function(prepped_dt,

# Calculate survey proportions:
num_summary_wttype =
num_so_ls[[wt_type]] %>%
group_by_at(unlist(summarize_by)) %>%
num_so_ls[[wt_type]] |>
group_by_at(unlist(summarize_by)) |>
summarize(
count = length(get(summarize_var)),
min = min(get(summarize_var), na.rm = TRUE),
max = max(get(summarize_var), na.rm = TRUE),
mean = survey_mean(get(summarize_var), vartype = NULL, na.rm = TRUE),
median = survey_median(get(summarize_var), vartype = NULL, na.rm = TRUE)
) %>%
) |>
setDT()

num_summary_ls[[wt_type]] = num_summary_wttype
Expand Down
2 changes: 1 addition & 1 deletion R/utils-pipe.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
#' @param lhs A value or the magrittr placeholder.
#' @param rhs A function call using the magrittr semantics.
#' @return The result of calling `rhs(lhs)`.
NULL
NULL
2 changes: 1 addition & 1 deletion man/variable_list.Rd

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

Loading
Loading