add_cols: Add columns

add_colsR Documentation

Add columns

Description

add_cols Adds a data frame to a layout object table body.

Usage

add_cols(object, DF, by, position = "left")

Arguments

object

A layout object including a body containing the table.

DF

A data frame with the columns to be added. The column used for matching is not added.

by

A character element with the name of the column specifying the column to use for joining (must be named identically in the layout object and the data frame containing the columns to be added).

position

A character value 'left' or 'right' specifying where the new columns should be added. Any specification other than 'right' will be interpreted as 'left'.

Value

A layout object with new columns added to the object body.

See Also

prepare for making a layout object.

Other table layout: add_colgroup(), add_rowgroup(), add_units(), firstrow_css(), layout_html(), order_by_vector(), order_layout(), prepare(), print_abbrev(), query_abbrev()

Examples

example_layout <- add_cols(
   example_layout,
   dta_valid_n,
   by = "key",
   position = "left")

eeenilsson/layout documentation built on Sept. 26, 2022, 8:14 p.m.