Housekeeping improvements
Fixes an error in exportMeasuredTraits() that
occurred when no measured trait variables (ending in "_a",
"_b", or "_c") were present in the dataset.
The function now returns a valid empty CM_df object instead
of failing during the binding step.
Added a suite of data-export functions to simplify extraction of structured ClimMob project outputs:
exportBlockData()exportMeasuredTraits()exportTrialMetadata()exportTricotRanks()exportVariablesDescription()These functions provide direct access to commonly used data structures in ClimMob projects, improving workflow efficiency for analysis and reporting.
as.data.frame.CM_list() method now defaults to
pivot.wider = TRUE, returning a wide-format data frame.as.data.frame.CM_list() method has a validation
line to only coerce to data.frame objects with more than 1 data
point.as.data.frame.CM_list() method, improving code clarity and
reusability
.replace_multichoice_codes().handle_geolocation_columns().replace_rankings().decode_assessments().merge_package_info().clean_column_names().drop_odk_system_fields().reorder_columns().safe_extract()as.data.frame.CM_list() tidynames = TRUE, producing more
consistent and informative names..set_long() when pivot.wider =
TRUE.project, package, registration,
and assessments)._longitude, _latitude) would
lead to the final data frame having zero columns. These are now removed
conditionally and safely.getProjectsCM() adds a new variable in the output
project_code that will represent the previous
project_id. The new variable project_id will
represent the id from the ClimMob server database not the id from the
user list of projects.ClimMobTools:::as.data.frame().smart.round() to handle
NA in the randomize() functionrandomize() to allocate blocksgetTraitList()getProjectsCM() to adapt to the new
version of ClimMobuserowner = to getDataCM() to
specify the owner of a given ClimMob projectgetProjectsCM()randomise() to check for unbalanced
designsrandomise() deals with unbalanced proportions of
technologies, meaning that we can test a whole set of technologies even
when not all have equal availabilityrmGeoIdentity() is added to offer an approach to remove
geographical identity of participantsrankTricot() builds a PlackettLuce rankings using the
tricot datagetProjectProgress() returns the progress
in a given projectas.data.frame() now handles ClimMob data
without the assessment info.as.data.frame() decodes values from categorical
variablesas.data.frame() decodes ties in the ranking datahttr::RETRY() instead of httr::GET()
as suggested by Anna Vasylytsyaprint() method is addedservergetDataCM(),
getProjectCM(), randomise() and
seed_need()as.data.frame() is provided to coerce
CM_list into a data frametemperature and rainfall now deals with
one single lonlat pointbuild_rankings to work with the new
implementations of PlackettLuce v0.2-8build_rankings