Learn R Programming

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

SSBtools (version 0.4.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

990

Version

0.4.0

License

Apache License 2.0 | file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Oyvind Langsrud

Last Published

January 21st, 2019

Functions in SSBtools (0.4.0)

AutoSplit

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

Find variable combinations by advanced wildcard/globbing specifications.
HierarchyCompute

Hierarchical Computations
HierarchicalGroups3

Finding hierarchical variable groups
matlabColon

Simulate Matlab's ':'
CrossDataDummyHierarchies

CrossDataDummyHierarchies
HierarchyComputeDummy

HierarchyComputeDummy
DimList2Hrc

DimList2Hrc/Hrc2DimList
CrossDataDummyHierarchy

CrossDataDummyHierarchy
DataDummyHierarchy

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

Finding dimList
DataFrameToMatrix

DataFrameToMatrix
FindTableGroup

Finding table(s) of hierarchical variable groups
HierarchyFix

Change the hierarchy table to follow the standard
Hierarchies2ModelMatrix

Model matrix representing crossed hierarchies
MakeHierFormula

Make model formula from data taking into account hierarchical variables
WildcardGlobbingVector

Selection of elements by wildcard/globbing
ForceFactorDataFrame

ForceFactorDataFrame
Unstack

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

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

Converting hierarchy specifications to a (signed) dummy matrix
RowGroups

Create numbering according to unique rows
RbindAll

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

Row selection by wildcard/globbing
FactorLevCorr

Factor level correlation
HierarchicalGroups

Finding hierarchical variable groups
DimList2Hierarchy

DimList2Hierarchy
MatrixPaste

Combining columns of a matrix
Hierarchy2Formula

Hierarchy2Formula
SSBtoolsData

Function that returns a dataset
FindCommonCells

Finding commonCells
SortRows

Sorting rows
FixHierarchy

FixHierarchy
HierarchicalGroups2

Finding hierarchical variable groups
Number

Adding leading zeros
ForceCharacterDataFrame

ForceCharacterDataFrame
MatrixToDataFrame

MatrixToDataFrame
Match

Matching rows in data frames
Stack

Stack columns from a data frame and include variables.
UniqueIntegerSortMatrix

Title UniqueIntegerSortMatrix
crossMerge

crossMerge
AddLeadingZeros

Add leading zeros to numbers while preserving other text
CbindIdMatch

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

AddNonExistingCode
AutoLevel

AutoLevel
CharacterDataFrame

CharacterDataFrame
AddMapsInput

AddMapsInput
CrossCodeFrames

Cross codes in data frames
AutoHierarchies

Ensure standardized coding of hierarchies