Metodebibliotek detailed table

knitr::opts_chunk$set(echo = TRUE)
library(knitr)
library(kableExtra)
library(stringr)
library(tidyverse)

Below is a detailed table containing the functions included in Statistic Norway's Metodebibliotek. Functions are organised by process and may appear multiple times.

ssblist <- read.csv("./SSBfuncs.csv")

ssbtabell <- NULL
for (i in 1:nrow(ssblist)){
  newline <- ssblist[i, -match("tags", names(ssblist))]
  tags_split <- strsplit(ssblist$tags[i], " ")[[1]]
  process <- str_extract(tags_split, ".+?(?=.)")
  antall <- length(unique(process))
  if (antall > 1){
    newline <- rbind(newline, newline[rep(1, antall - 1),])
  }
  newline$process <- unique(process)
  ssbtabell <- rbind(ssbtabell, newline)
}

ssbtabell <- ssbtabell[order(ssbtabell$process), ]
library(pander)
pander(ssbtabell, row.names = F, split.table=Inf)

Tilbake til metodebibliotek



statisticsnorway/metodebibliotek_testing documentation built on Jan. 21, 2022, 9:24 p.m.