Package: declared 0.25

Adrian Dusa

declared: Functions for Declared Missing Values

A zero dependency package containing functions to declare labels and missing values, coupled with associated functions to create (weighted) tables of frequencies and various other summary measures. Some of the base functions have been rewritten to make use of the specific information about the missing values, most importantly to distinguish between empty NA and declared NA values. Some functions have similar functionality with the corresponding ones from packages "haven" and "labelled". The aim is to ensure as much compatibility as possible with these packages, while offering an alternative in the objects of class "declared".

Authors:Adrian Dusa [aut, cre, cph], Daniel Antal [ctb]

declared_0.25.tar.gz
declared_0.25.tar.gz(r-4.5-noble)declared_0.25.tar.gz(r-4.4-noble)
declared_0.25.tgz(r-4.4-emscripten)declared_0.25.tgz(r-4.3-emscripten)
declared.pdf |declared.html
declared/json (API)

# Install 'declared' in R:
install.packages('declared', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/dusadrian/declared/issues

2.81 score 7 packages 24 scripts 1.3k downloads 38 exports 0 dependencies

Last updated 4 months agofrom:7681b725cf. Checks:2 OK. Indexed: no.

TargetResultLatest binary
Doc / VignettesOKJan 07 2025
R-4.5-linux-x86_64OKJan 07 2025

Exports:anyNAdeclaredanyNAemptyanyTagged_as.declaredas.havendeclareddrop_naformat_declaredgetTag_hasTag_is.declaredis.emptylabellabel<-labels<-makeTag_measurementmeasurement<-missing_rangemissing_range<-missing_valuesmissing_values<-names_valuesorder_declaredundeclarevalue_labelsvariable_labelw_fivenumw_IQRw_meanw_medianw_modew_quantilew_sdw_standardizew_summaryw_tablew_var

Dependencies:

Readme and manuals

Help Manual

Help pageTopics
Labelled vectors with declared missing valuesanyNAdeclared as.declared declared is.declared
Coerce to haven / labelled objectsas.haven
Drop information / undeclare labelled objectsdrop_na drop_undeclare undeclare
Test the presence of empty (undeclared) missing valuesanyNAempty is.empty
Get / Declare value labelslabel label<- labels labels<-
Get / Set measurement levels for declared objectsmeasurement measurement<-
Get / Declare missing valuesmissing_range missing_range<- missing_values missing_values<-
Compute weighted summaries for declared objectsweighted w_fivenum w_IQR w_mean w_median w_mode w_quantile w_sd w_standardize w_summary w_table w_var