Changelog
Source:NEWS.md
g6tr.survey 0.5.1
- Reworked the
step_set_*()variable-typing family around a single flat metadata schema: every question group now carries analias,alias_name,descriptionandlabel, 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; useget_aliases()to list aliases. - New
step_set_derived()marks analyst-created (“derived”) columns — recodes, collapsed variables, andps_*/cs_*penalty and cleaning scores. It attaches metadata without coercing class. Replacesstep_set_meta()(the former “META” type). - New
step_set_weight()marks survey weight columns (typeweight, coerced to numeric); supports one or several weights, each its own alias. - Renamed
step_set_module()tostep_set_folder(), and the metadata fieldsmodule/module_colstofolder/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 ofaliased()— expands a type to every column carrying it, e.g.select(x, typed("sr"))oracross(typed("fn"), ...). Unknown types error with a suggestion; a recognised-but-absent type selects nothing. -
srv_pivot_longer()gains akeep_attributesargument (defaultFALSE): whenTRUEit carries anattributeslist-column (class, levels,label, the surveymetadata) and ordersname, so the pivot can be reversed. Newsrv_pivot_wider()reverses it — rebuilding each column’s type (factor levels, andfn/weightback to numeric) and re-attachinglabelandmetadata— for reshaping typed survey data (e.g. before a Crunch upload). Default behaviour ofsrv_pivot_longer()is unchanged. -
step_prepare_forsta()now adds aresponse_duration_mincolumn (the Forstaqtimeduration, which is in seconds, expressed in minutes), typedtime. -
step_prepare_forsta()drops thevars_metaargument;markers,statusandvlistare now part of thevars_ignoredefault (all folded into the ignore type). -
forsta_guess_types()no longer dumps un-typed columns intoderived. Where the Forsta datamap has no type (or the data is not from Forsta) it now inferssr/mr/ft/fnfrom the column data itself, and when it still cannot tell it emits astep_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 untypedresponse_idcolumn already exists: it aborts (creating one from another column would overwrite it), unlessvar_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 (includingsrv_process_data_sr(),_mr(),_mr_grid(),_grid(),_numeric()and_date()), superseded by thestep_set_*()family andforsta_guess_types(). - Removed
relabel_with(); usestep_relabel()to relabel variable labels with a function. - Removed
step_set_demo(),step_set_loop_ft(),step_identify_rushers()andstep_identify_straightliners(). - Removed
srv_gather_MR(),srv_recode_MR()andsrv_id_straightline(). - Removed
srv_get_data()(the old Qualtrics survey wrapper). The low-level Qualtrics helpersqlt_get_data()/qlt_get_creds()remain (internal, inR/qualtrics.R). - Removed the stale
data-raw/DATASET_*.Rdataset-generation scripts. - Removed
step_crunch_prepare(); Crunch functionality lives in theg6tr.crunchpackage.
g6tr.survey 0.5.0
- Added
srv_prop_stats_hierarchical()andsrv_prop_stats_hierarchical_xlsx()for hierarchical proportion statistics and xlsx reporting across combinations of grouping variables withAllrollups. - Updated
aisc_spec_generate()to usegpt-5.4as the default model and refreshed the scoring metaprompt template. - Updated
srv_labels_fix()with a newuse_namesargument to replace missing or invalid labels with variable names when requested, and improved handling of labels already set toNA_character_. - Added new string helpers
str_get_lcp(),str_get_lcs(),str_remove_lcp(), andstr_remove_lcs()for detecting and removing longest common prefixes and suffixes. - Removed the
Biobasedependency. - Removed all
crunch_*functions. Crunch-related functionality now lives in the separateg6tr.crunchpackage. Removed thecrunchdependency.
g6tr.survey 0.4.6
- Major performance improvement to
aisc_score(): now uses parallel API calls viaellmer::parallel_chat_structured()instead of sequential batch processing.- New
max_activeandrpmparameters (fromellmer::parallel_chat_structured()) for controlling parallelization. - Added cost reporting: shows total cost and cost per 1K responses.
- New
- Updated scoring prompt generator to avoid conflicts with ellmer’s structured output formatting.
- New
oe_responses_remote_workdataset: ~200 synthetic survey responses at varying quality levels for testing and benchmarking AI scoring functions. - Removed deprecated
flag_oe_responses()andgenerate_prompt_oe_responses()functions.
g6tr.survey 0.4.5
- Reworked AI response scoring functionality. Added two functions:
-
aisc_spec_generate()generates a scoring specification. -
aisc_score()scores responses using a scoring specification, allowing for multiple scoring runs.
-
- Soft-deprecated
flag_oe_responses()andgenerate_prompt_oe_responses()functions.
g6tr.survey 0.4.4
- Hotfix updates for transformation steps and better cli output.
-
step_srv_source()implemented to pull data from source.
-
g6tr.survey 0.4.1
- Implementing Forsta backend functions:
-
forsta_ls()lists all available Forsta datasets. -
forsta_get_data()downloads a Forsta dataset. -
forsta_get_metadata()downloads variable metadata for a Forsta dataset.
-
g6tr.survey 0.4.0
- Replaced
srv_weight()function withsrv_add_weights().
g6tr.survey 0.3.29
- Added
relabel_with()function for relabeling variables with a function. - Added
flag_oe_responses()andgenerate_prompt_oe_responses()functions for flagging open-ended survey responses.
g6tr.survey 0.3.28
- Added new
projectparameter tocrunch_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
- Implementing additional tests for
srv_separate_mr()function.
g6tr.survey 0.3.26
- Implementing
srv_separate_mr()function.
g6tr.survey 0.3.24
- New function
fct_data_dummify()implemented tog6tr.survey.
g6tr.survey 0.3.23
- Migrated
is_gibberish()fromGlender/gibberlitetog6tr.survey.
g6tr.survey 0.3.22
- Added new functions to
g6tr.surveyfor handling factor operations:-
fct_as_labelled()convertsfactor->labelled numeric. -
fct_explicit_na_auto()replaces NAfactorvalues with an explicit category name. -
fct_to_sequential()convertsfactorlevels to sequential natural numbers. -
fct_data_as_labelled_verbose()converts allfactorcolumns tolabelled numericcolumns in a dataframe. -
report_labelled_col_mapping()prints detailed report on howlabelledare coded in a dataframe.
-
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.19
- New function
srv_prop_stats_crossing_wide()for producing custom summary stat output. Additionally, a newsrv_prop_stats_crossing_wide_xlsx()function to save the results of the former function into xlsx files. - Fixed
g6tr.uiissue withcrunch_gather_mr(). -
generate_dict()is now exported.
g6tr.survey 0.3.18
- New
srv_extract_failed_oe_ids()function.
g6tr.survey 0.3.16
- added new functions to
g6tr.surveyfor cleaning open end variables:-
srv_text_exact_match()for exact matching. -
srv_text_fuzzy_match()for fuzzy matching. -
srv_text_fuzzy_match_plot()to summarize sensitivity result fromsrv_text_fuzzy_match()with a plot. -
srv_text_fuzzy_match_result()to extract fuzzy match results fromsrv_text_fuzzy_match(). -
srv_text_finalize_fuzzy_match()to finalize joining method and string distance used insrv_text_fuzzy_match(). -
srv_text_detect_gibberish()to detect gibberish text.
-
g6tr.survey 0.3.15
- Refactored
srv_prop_test_ref().
g6tr.survey 0.3.12
- Fixed tidyselect-related bug in
srv_pivot_longer()introduced withtidyr1.3.0
g6tr.survey 0.3.11
- added 7 new functions to
g6tr.surveyfor 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 ofsbj_varthat are present in non-reference groups.
g6tr.survey 0.3.9
-
fct_case_when()now part of the exports.
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_finishedLogical. Filter to only finished responses. Defaults toTRUE. -
filter_quotasLogical. Remove responses whereq_terminate_flagisScreenedorQuotaMet. Default isTRUE. -
export_in_progressLogical. Only export responses not yet complete. Defaults toFALSE. -
decimal_as_commaLogical. IfTRUE, use a comma as a decimal separator instead of a period. Defaults toFALSE. -
recode_seen_unanswered_msInteger. Recode seen-but-unanswered choices for multi-select questions tovalue. Defaults to0 -
recode_seen_unansweredInteger. Recode seen-but-unanswered choices for multi-select questions tovalue. Defaults to0 -
use_labelsLogical. Instead of exporting the recode (numeric) value for the answer choice, export the text of the answer choice. Default isFALSE.
-
-
srv_categorize_data(): explicitly useas_factor()withlevels = "labels"for unlabelled values to becomeNA.
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 ofvct_prop_test_exact()update
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 tog6tr.survey::crunch_gather_mr.replace_namesargument was removed andreplace_regex = NULLwas set to default. Whenreplace_regexis 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.1
Fixed a bug with
cliprogress bar insrv_prop_stats_xlsx(). Update all notifications to usecli.Added tests for
srv_prop_stats_crossing()andsrv_prop_stats_xlsx().Use
.datapronoun insrv_prop_stats_crossing(),srv_prop_stats_xlsx()and corresponding internal function.
g6tr.survey 0.3.0
-
g6tr.surveyis extended with functions supporting automatic processing of variables. Most important are thesrv_categorize_data()function which assigns columns to the right question type (Single Response, Grid, Multiple Response, MR Grid and loops); andsrv_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 usedregular expressionthat we use for data processing. - New
ds_newsletter_newexample data set based on 2022 June Newsletter. - Updated examples and new internal test returning more explicit error when there are
NAs in variables insrv_weight(). - Genpop margins in
srv_genpop_margins()are updated. - Updated
srv_get_data()covers now updateds_race,s_generations_ethnicity, ands_regionvariables. - New tests for
srv_get_data()andsrv_weight().
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
-
srv_labels_fix()- makes sure that all variable labels are strings -
srv_labels_copy()- copies variable labels from one data frame to another - fixed
srv_prop_stats_crossing()when some variable labels are not strings
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_colorandborder_style - fixed issue with filling cells in the first column (i.e., column with subject categories names) with color when they had values
-3to-1or1to3.
g6tr.survey 0.2.9
-
srv_prop_test_ref()andsrv_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 insrv_prop_stats()for all combinations of grouping and subject variables provided bytidyselectexpressions. - New vignette
Summary statistics for proportion test. # g6tr.survey 0.2.8 -
uuidparameter ofsrv_gather_MR()can now be passed unquoted -
srv_extract_label()now returnsNA_character_when label attribute is - new function
srv_pivot_longer(): similar totidyr::pivot_longer(), but also keeps labels of pivoted variables and always converts values to character. Allowstidyselectcalls for variable selection. - new function
srv_extract_split()- split string into pieces, select pieces by position, glue them back.
g6tr.survey 0.2.7
- Extended
srv_weight()with weighting efficiency.
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()actuallynow doesn’t filter by q_terminate_flag if that column do not in extist in Qualtrics survey.
g6tr.survey 0.2.3
-
g6tr.surveystartup local version verification was extended since the internalCRANallows to install old versions of packages now.
g6tr.survey 0.2.2
-
srv_get_data()now doesn’t filter byq_terminate_flagif that column do not in extist in Qualtrics survey.
g6tr.survey 0.2.1
-
g6tr.surveyon startup verifies whether the local package version is up to date with the one on the internalCRAN.
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
-
srv_weight()simplified in weights extraction
g6tr.survey 0.1.5
-
srv_weights()- Language fixes to parameter descriptions.
- Eliminated
R CMDwarnings related to missing parameters descriptions.
g6tr.survey 0.1.2
-
srv_replace_colnames()can have a quite execution(verbose = FALSE)
g6tr.survey 0.1.1
-
srv_extract_label()can now take a vector of position arguments if you want to combine multiple splits.