sm_tidy_matrix: Tidy a Matrix Object

Description Usage Arguments

View source: R/matrix.R

Description

Creates a data frame out of a Matrix that has column and row names. Name defaults assume a term frequency matrix, but it is possible to give other names.

Usage

1
sm_tidy_matrix(x, rows_to = "document", cols_to = "term", values_to = "count")

Arguments

x

the matrix to tidy.

rows_to

names of the column containing the rownames; defaults to "document"

cols_to

names of the column containing the rownames; defaults to "term"

values_to

names of the column containing the rownames; defaults to "count"


statsmaths/smodels documentation built on Jan. 9, 2021, 1:07 p.m.