SSBtools1.5.5 package

Statistics Norway's Miscellaneous Tools

AddLeadingZeros

Add leading zeros to numbers while preserving other text

aggregate_by_pkg

Aggregate by base R or data.table

aggregate_multiple_fun

Wrapper to aggregate

As_TsparseMatrix

Transform to TsparseMatrix/dgTMatrix

AutoHierarchies

Ensure standardized coding of hierarchies

AutoSplit

Creating variables by splitting the elements of a character vector wit...

CbindIdMatch

Combine several data frames by using id variables to match rows

CharacterDataFrame

CharacterDataFrame

CheckInput

Checking function inputs

combine_formulas

Combine formulas

CrossCodeFrames

Cross codes in data frames

crossMerge

crossMerge

DataDummyHierarchy

Create a (signed) dummy matrix for hierarcical mapping of codes in dat...

DataFrameToMatrix

DataFrameToMatrix

DimList2Hierarchy

DimList2Hierarchy

DimList2Hrc

DimList2Hrc/Hrc2DimList

dummy_aggregate

aggregate_multiple_fun using a dummy matrix

DummyApply

Apply a function to subsets defined by a dummy matrix

DummyDuplicated

Duplicated columns in dummy matrix

DummyHierarchy

Converting hierarchy specifications to a (signed) dummy matrix

Extend0

Add zero frequency rows

Extend0rnd1

varGroups-attribute to Extend0, Example functions

FactorLevCorr

Factor level correlation

FindCommonCells

Finding commonCells

FindDimLists

Finding dimList

FindDisclosiveCells

Find directly disclosive cells

FindHierarchies

Finding hierarchies automatically from data

FindTableGroup

Finding table(s) of hierarchical variable groups

fix_fun_amf

Fix fun parameter to aggregate_multiple_fun

fix_vars_amf

Fix vars parameter to aggregate_multiple_fun

ForceCharacterDataFrame

ForceCharacterDataFrame

ForceFactorDataFrame

ForceFactorDataFrame

formula_from_vars

Generate model formula by specifying which variables have totals or no...

formula_include_hierarchies

Replace variables in formula with sum of other variables

formula_utils

Functions for formula manipulation

FormulaSelection

Limit matrix or data frame to selected model terms

FormulaSums

Sums (aggregates) and/or sparse model matrix with possible cross table

GaussIndependent

Linearly independent rows and columns by Gaussian elimination

GaussIterationFunction

An iFunction argument to GaussSuppression

GaussSuppression

Secondary suppression by Gaussian elimination

HierarchicalGroups

Finding hierarchical variable groups

HierarchicalGroups2

Finding hierarchical variable groups

HierarchicalGroups3

Finding hierarchical variable groups

HierarchicalWildcardGlobbing

Find variable combinations by advanced wildcard/globbing specification...

Hierarchies2ModelMatrix

Model matrix representing crossed hierarchies

HierarchiesAndFormula2ModelMatrix

Model matrix representing crossed hierarchies according to a formula

Hierarchy2Formula

Hierarchy2Formula

HierarchyCompute

Hierarchical Computations

HierarchyCompute2

Extended Hierarchical Computations

HierarchyComputeDummy

HierarchyComputeDummy

HierarchyFix

Change the hierarchy table to follow the standard

inc_default

Default progress indicator function

LSfitNonNeg

Non-negative regression fits with a sparse overparameterized model mat...

MakeFreq

Microdata frequency data conversion

MakeHierFormula

Make model formula from data taking into account hierarchical variable...

Match

Matching rows in data frames

matlabColon

Simulate Matlab's ':'

Matrix2list

Convert matrix to sparse list

MatrixPaste

Combining columns of a matrix

MatrixToDataFrame

MatrixToDataFrame

Mipf

Iterative proportional fitting from matrix input

model_aggregate

Hierarchical aggregation via model specification

Model_Matrix

Overparameterized model matrix

ModelMatrix

Model matrix from hierarchies and/or a formula

Number

Adding leading zeros

NumSingleton

Decoding of singletonMethod

quantile_weighted

Weighted quantiles

RbindAll

Combining several data frames when the columns don't match

Reduce0exact

Reducing a non-negative regression problem

RoundWhole

Round values that are close two whole numbers

RowGroups

Create numbering according to unique rows

SortRows

Sorting rows of a matrix or data frame

SSBtoolsData

Function that returns a dataset

Stack

Stack columns from a data frame and include variables.

UniqueSeq

Sequence within unique values

unmatrix

Transform data frame with embedded matrices

Unstack

Unstack a column from a data frame and include additional variables.

WildcardGlobbing

Row selection by wildcard/globbing

WildcardGlobbingVector

Selection of elements by wildcard/globbing

Functions used by other packages from Statistics Norway are gathered. General data manipulation functions, algorithms for statistical disclosure control (Langsrud, 2024) <doi:10.1007/978-3-031-69651-0_6> and functions for hierarchical computations by sparse model matrices are included (Langsrud, 2023) <doi:10.32614/RJ-2023-088>.

  • Maintainer: Øyvind Langsrud
  • License: MIT + file LICENSE
  • Last published: 2024-10-21