Learn R Programming

⚠️There's a newer version (1.7.5) of this package.Take me there.

SSBtools (version 0.8.0)

Statistics Norway's Miscellaneous Tools

Description

Functions used by other packages from Statistics Norway are gathered. General data manipulation functions, and functions for hierarchical computations are included. The hierarchy specification functions are useful within statistical disclosure control.

Copy Link

Version

Install

install.packages('SSBtools')

Monthly Downloads

969

Version

0.8.0

License

Apache License 2.0 | file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Oyvind Langsrud

Last Published

September 17th, 2020

Functions in SSBtools (0.8.0)

AddLeadingZeros

Add leading zeros to numbers while preserving other text
AutoHierarchies

Ensure standardized coding of hierarchies
CharacterDataFrame

CharacterDataFrame
CbindIdMatch

Combine several data frames by using id variables to match rows
AutoSplit

Creating variables by splitting the elements of a character vector without needing a split string
AddMapsInput

AddMapsInput
CrossDataDummyHierarchy

CrossDataDummyHierarchy
CrossDataDummyHierarchies

CrossDataDummyHierarchies
AddNonExistingCode

AddNonExistingCode
CrossCodeFrames

Cross codes in data frames
DummyHierarchy

Converting hierarchy specifications to a (signed) dummy matrix
FactorLevCorr

Factor level correlation
Hierarchy2Formula

Hierarchy2Formula
HierarchiesAndFormula2ModelMatrix

Model matrix representing crossed hierarchies according to a formula
Match

Matching rows in data frames
WildcardGlobbing

Row selection by wildcard/globbing
Matrix2list

Convert matrix to sparse list
SortRows

Sorting rows
FindCommonCells

Finding commonCells
FindDimLists

Finding dimList
GaussSuppression

Secondary suppression by Gaussian elimination
DataDummyHierarchy

Create a (signed) dummy matrix for hierarcical mapping of codes in data
DimList2Hrc

DimList2Hrc/Hrc2DimList
DimList2Hierarchy

DimList2Hierarchy
ForceFactorDataFrame

ForceFactorDataFrame
FindTableGroup

Finding table(s) of hierarchical variable groups
HierarchicalGroups

Finding hierarchical variable groups
HierarchicalGroups2

Finding hierarchical variable groups
ForceCharacterDataFrame

ForceCharacterDataFrame
FormulaSums

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

Finding hierarchical variable groups
MatrixPaste

Combining columns of a matrix
MatrixToDataFrame

MatrixToDataFrame
WildcardGlobbingVector

Selection of elements by wildcard/globbing
HierarchyComputeDummy

HierarchyComputeDummy
HierarchyFix

Change the hierarchy table to follow the standard
HierarchyCompute

Hierarchical Computations
Number

Adding leading zeros
HierarchyCompute2

Extended Hierarchical Computations
RbindAll

Combining several data frames when the columns don't match
SSBtoolsData

Function that returns a dataset
RowGroups

Create numbering according to unique rows
DataFrameToMatrix

DataFrameToMatrix
matlabColon

Simulate Matlab's ':'
HierarchicalWildcardGlobbing

Find variable combinations by advanced wildcard/globbing specifications.
crossMerge

crossMerge
Hierarchies2ModelMatrix

Model matrix representing crossed hierarchies
MakeFreq

Microdata frequency data conversion
RoundWhole

Round values that are close two whole numbers
Reduce0exact

Reducing a non-negative regression problem
MakeHierFormula

Make model formula from data taking into account hierarchical variables
Unstack

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

Sequence within unique values
Stack

Stack columns from a data frame and include variables.