as.meta: "meta" Component of "textmeta"-Objects

Description Usage Arguments Value Examples

View source: R/as.meta.R

Description

Helper to create the requested data.frame to create a "textmeta" object.

Usage

1
2
3
4
5
6
7
8
as.meta(
  x,
  cols = colnames(x),
  idCol = "id",
  dateCol = "date",
  titleCol = "title",
  dateFormat
)

Arguments

x

data.frame to convert

cols

character vector with columns which should be kept

idCol

character string with column name of the IDs

dateCol

character string with column name of the Dates

titleCol

character string with column name of the Titles

dateFormat

character string with the date format in x for as.Date. If not supplied, dates are not transformed.

Value

A data.frame with columns "id", "date", "title" and user-specified others.

Examples

1
2
meta <- data.frame(id = 1:3, additionalVariable = matrix(5, ncol = 4, nrow = 3))
(as.meta(meta))

tosca documentation built on Oct. 28, 2021, 5:07 p.m.