Skip to contents

g6tr.survey 0.5.1

  • Reworked the step_set_*() variable-typing family around a single flat metadata schema: every question group now carries an alias, alias_name, description and label, set consistently across the step functions.
  • New aliased() tidyselect helper that expands an alias to every column in its question group, for use in any tidyselect context (e.g. select(x, aliased("s_race"))). An unknown name falls back to a matching column or errors with a suggestion; use get_aliases() to list aliases.
  • New step_set_derived() marks analyst-created (“derived”) columns — recodes, collapsed variables, and ps_* / cs_* penalty and cleaning scores. It attaches metadata without coercing class. Replaces step_set_meta() (the former “META” type).
  • New step_set_weight() marks survey weight columns (type weight, coerced to numeric); supports one or several weights, each its own alias.
  • Renamed step_set_module() to step_set_folder(), and the metadata fields module / module_cols to folder / folder_cols. A folder may be a nested path (e.g. "Module 1/Section A") and lines up with Crunch folders.
  • New typed() tidyselect helper — the type-oriented sibling of aliased() — expands a type to every column carrying it, e.g. select(x, typed("sr")) or across(typed("fn"), ...). Unknown types error with a suggestion; a recognised-but-absent type selects nothing.
  • srv_pivot_longer() gains a keep_attributes argument (default FALSE): when TRUE it carries an attributes list-column (class, levels, label, the survey metadata) and orders name, so the pivot can be reversed. New srv_pivot_wider() reverses it — rebuilding each column’s type (factor levels, and fn/weight back to numeric) and re-attaching label and metadata — for reshaping typed survey data (e.g. before a Crunch upload). Default behaviour of srv_pivot_longer() is unchanged.
  • step_prepare_forsta() now adds a response_duration_min column (the Forsta qtime duration, which is in seconds, expressed in minutes), typed time.
  • step_prepare_forsta() drops the vars_meta argument; markers, status and vlist are now part of the vars_ignore default (all folded into the ignore type).
  • forsta_guess_types() no longer dumps un-typed columns into derived. Where the Forsta datamap has no type (or the data is not from Forsta) it now infers sr / mr / ft / fn from the column data itself, and when it still cannot tell it emits a step_set____() placeholder that errors when sourced — so nothing is silently mis-typed. Also degrades gracefully (data-driven guessing) instead of erroring when no Forsta metadata is present.
  • step_set_id() no longer silently does nothing when an untyped response_id column already exists: it aborts (creating one from another column would overwrite it), unless var_id = "response_id" types the existing column in place.
  • get_aliases() now warns when one alias keys more than one question group (which would silently merge unrelated variables).
  • New step_relevel() relabels the factor levels of selected columns via a function, preserving level order and metadata.
  • Removed the legacy srv_categorize_data() / srv_process_data() pipeline (including srv_process_data_sr(), _mr(), _mr_grid(), _grid(), _numeric() and _date()), superseded by the step_set_*() family and forsta_guess_types().
  • Removed relabel_with(); use step_relabel() to relabel variable labels with a function.
  • Removed step_set_demo(), step_set_loop_ft(), step_identify_rushers() and step_identify_straightliners().
  • Removed srv_gather_MR(), srv_recode_MR() and srv_id_straightline().
  • Removed srv_get_data() (the old Qualtrics survey wrapper). The low-level Qualtrics helpers qlt_get_data() / qlt_get_creds() remain (internal, in R/qualtrics.R).
  • Removed the stale data-raw/DATASET_*.R dataset-generation scripts.
  • Removed step_crunch_prepare(); Crunch functionality lives in the g6tr.crunch package.

g6tr.survey 0.5.0

  • Added srv_prop_stats_hierarchical() and srv_prop_stats_hierarchical_xlsx() for hierarchical proportion statistics and xlsx reporting across combinations of grouping variables with All rollups.
  • Updated aisc_spec_generate() to use gpt-5.4 as the default model and refreshed the scoring metaprompt template.
  • Updated srv_labels_fix() with a new use_names argument to replace missing or invalid labels with variable names when requested, and improved handling of labels already set to NA_character_.
  • Added new string helpers str_get_lcp(), str_get_lcs(), str_remove_lcp(), and str_remove_lcs() for detecting and removing longest common prefixes and suffixes.
  • Removed the Biobase dependency.
  • Removed all crunch_* functions. Crunch-related functionality now lives in the separate g6tr.crunch package. Removed the crunch dependency.

g6tr.survey 0.4.7

  • Package update to work with g6tr.dl instead of g6tr.datalake.

g6tr.survey 0.4.6

  • Major performance improvement to aisc_score(): now uses parallel API calls via ellmer::parallel_chat_structured() instead of sequential batch processing.
    • New max_active and rpm parameters (from ellmer::parallel_chat_structured()) for controlling parallelization.
    • Added cost reporting: shows total cost and cost per 1K responses.
  • Updated scoring prompt generator to avoid conflicts with ellmer’s structured output formatting.
  • New oe_responses_remote_work dataset: ~200 synthetic survey responses at varying quality levels for testing and benchmarking AI scoring functions.
  • Removed deprecated flag_oe_responses() and generate_prompt_oe_responses() functions.

g6tr.survey 0.4.5

  • Reworked AI response scoring functionality. Added two functions:
  • Soft-deprecated flag_oe_responses() and generate_prompt_oe_responses() functions.

g6tr.survey 0.4.4

  • Hotfix updates for transformation steps and better cli output.

g6tr.survey 0.4.2

  • Survey transformation steps

g6tr.survey 0.4.1

g6tr.survey 0.4.0

g6tr.survey 0.3.29

  • Added relabel_with() function for relabeling variables with a function.
  • Added flag_oe_responses() and generate_prompt_oe_responses() functions for flagging open-ended survey responses.

g6tr.survey 0.3.28

  • Added new project parameter to crunch_write_dataset(). Datasets are now created in the “[SANDBOX]” project by default.
  • New crunch_mv_variables() function for moving variables in Crunch with tidyselect syntax.

g6tr.survey 0.3.27

g6tr.survey 0.3.26

g6tr.survey 0.3.25

  • Removing implementation and call to of check_prettyxlsx() function.

g6tr.survey 0.3.24

g6tr.survey 0.3.23

g6tr.survey 0.3.22

g6tr.survey 0.3.21

  • Updated processing of categorical columns in srv_get_data() to avoid relying on integer value coding.

g6tr.survey 0.3.20

  • prettyxlsx is now a CRAN dependency.

g6tr.survey 0.3.19

g6tr.survey 0.3.18

g6tr.survey 0.3.17

  • New crunch_read_dataset() and crunch_write_dataset() functions.

g6tr.survey 0.3.16

g6tr.survey 0.3.15

g6tr.survey 0.3.14

  • Fixed bugs with srv_process_data().

g6tr.survey 0.3.13

  • Added dichotomization to crunch_gather_mr().

g6tr.survey 0.3.12

g6tr.survey 0.3.11

  • added 7 new functions to g6tr.survey for better crunch uploads:
    • crunch_update_aliases() to update aliases.
    • crunch_add_data() for appending additional data to crunch.
    • crunch_identify_alias() to identify fields based on a regex.
    • crunch_update_name() to make updating field names easier.
    • crunch_descriptions_replace() to do text replacements in descriptions.
    • crunch_descriptions_remove_html() to remove all html tags.
    • crunch_fields_remove_na() to remove fields with all NAs.

g6tr.survey 0.3.10

  • fixed error in srv_prop_test_ref() that was caused by reference group not having all the levels of sbj_var that are present in non-reference groups.

g6tr.survey 0.3.9

g6tr.survey 0.3.8

srv_prop_stats_crossing() fixes: * preserve the user-defined order of subject and grouping variables * isolate subject variable levels in nested output format

g6tr.survey 0.3.7

  • Added additional features to srv_get_data():
    • filter_finished Logical. Filter to only finished responses. Defaults to TRUE.
    • filter_quotas Logical. Remove responses where q_terminate_flag is Screened or QuotaMet. Default is TRUE.
    • export_in_progress Logical. Only export responses not yet complete. Defaults to FALSE.
    • decimal_as_comma Logical. If TRUE, use a comma as a decimal separator instead of a period. Defaults to FALSE.
    • recode_seen_unanswered_ms Integer. Recode seen-but-unanswered choices for multi-select questions to value. Defaults to 0
    • recode_seen_unanswered Integer. Recode seen-but-unanswered choices for multi-select questions to value. Defaults to 0
    • use_labels Logical. Instead of exporting the recode (numeric) value for the answer choice, export the text of the answer choice. Default is FALSE.
  • srv_categorize_data(): explicitly use as_factor() with levels = "labels" for unlabelled values to become NA.

g6tr.survey 0.3.6

  • vct_prop_test_exact() - added rounding of inputs to significantly speed up when data is weighted
  • srv_prop_stats_crossing() - minor optimization; significant speed up when data is weighted because of vct_prop_test_exact() update

g6tr.survey 0.3.5

  • Updated Crunch Vignette.

g6tr.survey 0.3.4

  • Added checks to g6tr.survey::srv_gather_MR_crunch() to account for duplicated, missing or NA records after applying regex to subvariable descriptions.

  • g6tr.survey::srv_gather_MR_crunch() was renamed to g6tr.survey::crunch_gather_mr.

  • replace_names argument was removed and replace_regex = NULL was set to default. When replace_regex is a non-NULL character scalar, we do the replacements.

g6tr.survey 0.3.3

  • Added two new functions to g6tr.survey.
    • crunch_reorder_sr() for reordering single response variables
    • crunch_reorder_mr() for reordering multiple response variables

g6tr.survey 0.3.2

  • g6tr.dev was renamed to g6tr.ui.

g6tr.survey 0.3.1

g6tr.survey 0.3.0

  • g6tr.survey is extended with functions supporting automatic processing of variables. Most important are the srv_categorize_data() function which assigns columns to the right question type (Single Response, Grid, Multiple Response, MR Grid and loops); and srv_process_data() function which takes categorized data and applies pre-processing functions to it. Along with those two, there are numerous smaller functions that help with pre-processing and bunch of automatic tests.
  • New switch function srv_regex() returning most commonly used regular expression that we use for data processing.
  • New ds_newsletter_new example data set based on 2022 June Newsletter.
  • Updated examples and new internal test returning more explicit error when there are NAs in variables in srv_weight().
  • Genpop margins in srv_genpop_margins() are updated.
  • Updated srv_get_data() covers now updated s_race, s_generation s_ethnicity, and s_region variables.
  • New tests for srv_get_data() and srv_weight().

g6tr.survey 0.2.14

  • Use g6tr.dev::check_g6tr_cran_for_new_version() on package startup.

g6tr.survey 0.2.13

srv_prop_test_ref() updates: * It is now possible to compare to a reference category when overall is TRUE. * Fixed a bug when spaces in overall_name are replaces with “.”

g6tr.survey 0.2.12

g6tr.survey 0.2.11

  • Apply styler.

g6tr.survey 0.2.10

  • srv_prop_stats_xlsx() now can take additional arguments passed to internal functions to control the formatting of the cells in Excel sheets. Currently supported are: overall_percent_font_color,overall_fill_color, group_percent_font_color, header_font_color, header_fill_color, header_border_color, header_border_style, border_color and border_style
  • fixed issue with filling cells in the first column (i.e., column with subject categories names) with color when they had values -3 to -1 or 1 to 3.

g6tr.survey 0.2.9

  • srv_prop_test_ref() and srv_prop_test_within() functions: proportion tests against overall proportions, against a reference category or within categories.
  • srv_prop_stats() for calculation of indices and proportion p vals of a categorical variable levels within groups provided by another categorical variable.
  • vct_prop_test_pval() for vectorized proportion p value calculation.
  • srv_prop_stats_crossing() - proportion statistics as in srv_prop_stats() for all combinations of grouping and subject variables provided by tidyselect expressions.
  • New vignette Summary statistics for proportion test. # g6tr.survey 0.2.8
  • uuid parameter of srv_gather_MR() can now be passed unquoted
  • srv_extract_label() now returns NA_character_ when label attribute is
  • new function srv_pivot_longer(): similar to tidyr::pivot_longer(), but also keeps labels of pivoted variables and always converts values to character. Allows tidyselect calls for variable selection.
  • new function srv_extract_split() - split string into pieces, select pieces by position, glue them back.

g6tr.survey 0.2.7

g6tr.survey 0.2.6

  • Added rmarkdown to Suggests.

g6tr.survey 0.2.5

  • srv_get_data() really! now doesn’t filter by q_terminate_flag if that column do not in extist in Qualtrics survey.

g6tr.survey 0.2.4

  • srv_get_data() actually now doesn’t filter by q_terminate_flag if that column do not in extist in Qualtrics survey.

g6tr.survey 0.2.3

  • g6tr.survey startup local version verification was extended since the internal CRAN allows to install old versions of packages now.

g6tr.survey 0.2.2

  • srv_get_data() now doesn’t filter by q_terminate_flag if that column do not in extist in Qualtrics survey.

g6tr.survey 0.2.1

  • g6tr.survey on startup verifies whether the local package version is up to date with the one on the internal CRAN.

g6tr.survey 0.2.0

  • Introduced srv_get_data() function that extracts clean survey data from Qualtrics survey based on our baseline template with demographic questions.

g6tr.survey 0.1.8

  • srv_add_prop_test() added to test proportional differences. This method is similar to how Crunch calculates them and will provide the same outputs

g6tr.survey 0.1.7

g6tr.survey 0.1.6

  • srv_recode_MR() added

g6tr.survey 0.1.5

  • srv_weights()
    • Language fixes to parameter descriptions.
    • Eliminated R CMD warnings related to missing parameters descriptions.

g6tr.survey 0.1.4

  • srv_weights() modified
    • Native Americans merged with Mixed or Other Race

g6tr.survey 0.1.3

  • srv_weights() added for survey data weighting

g6tr.survey 0.1.2

g6tr.survey 0.1.1

  • srv_extract_label() can now take a vector of position arguments if you want to combine multiple splits.

g6tr.survey 0.1.0

  • g6tr.survey officialy split from base g6tr package.