get_metadata: Gets metadata from specified source.

View source: R/get_metadata.R

get_metadataR Documentation

Gets metadata from specified source.

Description

Gets metadata from specified source.

Usage

get_metadata(
  sourcetype,
  from_dir = getwd(),
  filename = "textot.txt",
  encoding = "UTF-8",
  rtibble
)

Arguments

sourcetype

the type of source ("rtibble","txm" or "iramuteq")

from_dir

the corpus directory (contains metadata.csv and multiple .txt files)

filename

the name of the Iramuteq-formatted txt file (defaults to "textot.txt")

encoding

the encoding of the TXM corpus (defaults to UTF-8)

rtibble

the name of the R tibble, if relevant (sourcetype="rtibble")

Value

a tibble of metadata

Examples

get_metadata(sourcetype="txm",
             from_dir=system.file("extdata/fables",package="textoteR"),
             encoding="UTF-8")
get_metadata(sourcetype="iramuteq",
             from_dir=system.file("extdata",package="textoteR"),
             filename="macron_covid.txt",
             encoding="UTF-8")
get_metadata(sourcetype="rtibble",
             rtibble=LVtweets)

lvaudor/textoteR documentation built on April 5, 2025, 3:03 a.m.