Learn R Programming

dhlabR

The goal of dhlabR is to provide access to National Library text data for quantitative analysis. It provides utility functions for requesting data from the dhlab api (api.nb.no/dhlab)

Installation

You can install the development version of dhlabR from GitHub with:

# install.packages("devtools")
devtools::install_github("NationalLibraryOfNorway/dhlabR")

Example

This is a basic example which shows you how to solve a common problem:

library(dhlabR)
# Get corpus

corpus = get_document_corpus(doctype="digibok", "author" = "Ibsen", limit=100)

Copy Link

Version

Install

install.packages('dhlabR')

Monthly Downloads

7

Version

1.0.6

License

GPL (>= 3)

Maintainer

Ingerid Dale

Last Published

July 26th, 2024

Functions in dhlabR (1.0.6)

get_ngram_from_books

Get Ngram Count per Year for National Library Book Collection
get_reference_words

Retrieve Reference Words Count and Relative Frequency
get_concordance

Retrieve Concordance for Words in Documents
get_collocations

Get collocations for word in corpus
get_document_corpus

Get Document Corpus
get_metadata

Get National Library Metadata for identifiers
get_ngram

Hidden internal function to get NGRAM
get_document_frequencies

Retrieve Token Frequencies in Documents
get_dispersion

Dispersion of tokens in a text
get_ngram_from_newspapers

Get Ngram Count per Year for National Library Newspaper Collection
get_urn_frequencies

Get word count frequencies for a list of URNs or dhlabids
ngram

Function to get and convert NGRAM
ngram_conv

Hidden internal function to convert NGRAM