Changes in version 0.25 (2024-09-08) o Adapted class methods for declared objects with "Date" inputs o Improved function sum() for declared objects o Fixed bug in undeclare() with numeric values and character (declared) missing values (thanks to Kyle Husmann for the report) o New methods for vec_proxy() and vec_restore() for objects of class "declared" (thanks to Kyle Husmann for the PR) Changes in version 0.24 (2023-12-07) o Objects of class "Date" are now accepted as input for a declared object o The package no longer automatically coerces from numeric to integer o Improved version of w_table() for duplicated labels o Bug fix in as.haven() for declared missing values with no labels (thanks to Marijana Glavica for the report) Changes in version 0.23 (2023-10-01) o Maintenance work to comply with the CRAN related issues generated by the new behavior of the base function is.atomic() Changes in version 0.22 (2023-07-10) o Improved treatment of extended missing values, via imported haven objects o w_table() now correctly display the missing values, in the declared order o New argument "vlabel" in function w_table(), to print the variable label, if present Changes in version 0.21 (2023-05-16) - Function declared() now recognize a "labels" attribute of the input object, if it already exists - Fixed bug in function measurement(), when dealing with variables with missing range only (no discrete missing values declared) - To prevent abrupt errors when subsetting a data frame with declared variables, the default action is now to impose unique value labels - The function labels() gains a new argument "print_as_df" (TRUE by default) to print the labels as a data frame - Printing a declared object now display a maximum of seven value labels, with a message indicating how many are left out - New functions w_IQR() and w_fivenum() Changes in version 0.20 (2023-03-03) - Base functions is.element(), %in% and match() now properly recognize declared objects - Bug fix affecting declared character objects, via as.character.declared() - New functions anyNAempty() and anyNAdeclared() Changes in version 0.19 (2022-10-01) - More effort on meeting Good Practices for pkgcheck() - Bug fix hapenning on r-devel, to silence CRAN errors Changes in version 0.18 (2022-09-29) - Improved method for rbind() data frames, taking care of declared variables - Function value_labels() has been replaced with the generic base function labels(), and the function variable_label() has been replaced with the function label() - Changed default for as.factor(), with values and (where available) levels (thanks to Daniel Antal for the report) - New generic function drop_na() to drop information about the declared missing values Changes in version 0.17 (2022-06-20) - Correctly determine the object mode, function of both value labels and input values (especially when all input values are empty NA values) - New argument "measurement" in function declared() - New function measurement(), to query and allocate measurement levels Changes in version 0.16 (2022-05-12) - New logical argument "values" in the S3 method for as.character() - Removed aliases as_declared() and as_haven() from the namespace - Fixed as.haven() which should return double objects Changes in version 0.15 (2022-04-13) - Class method for many / most primitive functions, with declared objects - Bug fix in w_table() affecting zero frequency categories - Dropped alias frtable() from function w_table() - New function is.empty(), testing the presence of undeclared missing values - Main function declare() is now generic, allowing flexibility to create custom methods for any other classes of objects - Removed dependency on package admisc, by incorporating the necessary functionality as internal functions Changes in version 0.13 (2022-04-03) - New functions w_mode() and w_standardize() - Fixed w_summary(), summaries should not be rounded by default - Fixed w_mean() to weight negative values Thanks to an anonymous reviewer for reporting and suggesting the following: - New argument "drop" in function undeclare() - Bug fix in the class methods for head() and tail() - Function declared now duly recognizes input factors - Extended as.factor() for objects of class "declared" - Added proper class methods for primitive arithmetic operations - New functions as.declared(), is.declared() - Added explanatory documentation (for instance in the DESCRIPTION file) to explain the reasons for reimplementing some of the base functions Changes in version 0.12 (2022-03-14) - New function w_summary() - Functions w_table() and w_quantile() now properly deal with missing weights - New argument "trim" in function w_mean() Changes in version 0.11 (2022-03-03) - Fixed w_table(), an internal object was inadvertently returned - Improved printing of crosstables Changes in version 0.10 (2022-02-22) - New functions w_mean(), w_var() and w_sd(), w_quantile() and w_median(), to obtain weighted versions of mean, variance and standard deviation, quantiles and median, respectively, adapted to declared objects - Fixed a bug in as.haven.declared(), when all values are (declared) missing and labels are not numeric - Argument "weight" changed to "wt" in w_table() - New arguments in function w_table(): "observed" to only print observed values, and "margin" to calculate proportions in crosstabs - Function w_table() now accepts a second argument "y" to create crosstabs - Function frtable() renamed to w_table() standing for weighted table Changes in version 0.9 (2022-02-11) - New argument "weight" in function frtable(), allowing to weight not only valid but also missing values - More robust function frtable() in treating declared values with overlapping labels (e.g. hierarchical ISCO codes and categories) - Fixed a bug in declared() when all values are completely missing Changes in version 0.8 (2022-01-11) - Improved treatment of equality and non-equality, now accepting labels as well as values - Reverted functionality to not dropping the attributes in arithmetic operations, this is now left to the users' preference Changes in version 0.7 (2021-09-02) - Bug fix saving declared data frames as .csv files - as.declared() now retains the "format.spss" attribute, if existing Changes in version 0.6 (2021-08-18) - Improved treatment of arithmetic operations, attributes are no longer propagated (thanks to Randall Pruim for the suggestion) - Modified as.haven() for objects of class "declared", to avoid a bug in package ReadStat that prevents exporting missing values to SPSS for integer variables Changes in version 0.5 (2021-06-16) - Initial version