df2dtm: Convert a data frame to a document-term matrix.

df2dtmR Documentation

Convert a data frame to a document-term matrix.

Description

Convert a data frame to a document-term matrix.

Usage

df2dtm(df, document = "pmid", term = "DescriptorName", counts = "type")

Arguments

df

a dataframe

document

a string

term

a string

counts

a string, either "type" or "token"

Value

A sparse matrix


jaytimm/text2df documentation built on July 21, 2023, 1:58 a.m.