vector_to_row: Convert vector to table row and back

View source: R/tableRow.R

vector_to_rowR Documentation

Convert vector to table row and back

Description

Convert vector to table row and back

Usage

vector_to_row(cells, asis = FALSE, linebreak = TRUE)

row_to_vector(row, asis = FALSE, deparse = TRUE)

Arguments

cells

A list or vector of cell contents.

asis

If FALSE, add or remove blanks around cell contents.

linebreak

If TRUE, add a line break marker.

row

A row from a table

deparse

Should the result be deparsed?

Value

vector_to_row returns a LaTeX2 object which could be a row in a tabular object.

row_to_vector returns a character vector of the deparsed contents of the row, or if deparse is FALSE, a list of the contents.

Examples

vector_to_row(1:3)
row_to_vector("1 & 2 & content \\\\")
row_to_vector("1 & 2 & content \\\\", deparse = FALSE)

parseLatex documentation built on June 8, 2025, 10:19 a.m.