SSBtools on CRAN | pkgdown website | GitHub Repository |
---|
Description
Functions used by other packages from Statistics Norway are gathered. General data manipulation functions, algorithms for statistical disclosure control (Langsrud, 2024) and functions for hierarchical computations by sparse model matrices are included (Langsrud, 2023).
Installation
You can install SSBtools from CRAN with
install.packages("SSBtools")
Alternatively install from GitHub bydevtools::install_github("statisticsnorway/SSBtools")
if you want to test the newest changes.
Some of the functions
AutoHierarchies() | Ensure standardized coding of hierarchies |
GaussIndependent()/GaussRank() | Linearly independent rows and columns by Gaussian elimination |
GaussSuppression() | Secondary suppression by Gaussian elimination |
FindHierarchies()/FindDimLists() | Finding hierarchies automatically from data |
HierarchicalWildcardGlobbing() | Find variable combinations by advanced wildcard/globbing specifications. |
HierarchyCompute() | Hierarchical Computations |
Match() | Matching rows in data frames |
Mipf() | Iterative proportional fitting from matrix input |
ModelMatrix() | Model matrix from hierarchies and/or a formula (common interface) |
RowGroups() | Create numbering according to unique rows |
SSBtoolsData() | Function that returns a dataset |
aggregate_by_pkg() | Aggregate by base R or data.table |
aggregate_multiple_fun() | Wrapper to aggregate |
map_hierarchies_to_data() | Add variables to dataset based on hierarchies |
model_aggregate() | Hierarchical aggregation via model specification |
tables_by_formulas() | Tabular Statistics Based on Formulas |
quantile_weighted() | Weighted quantiles |
📌 See the broader list of available functions.
Official version on CRAN: https://cran.r-project.org/package=SSBtools