Learn R Programming

rlistings (version 0.2.7)

format_colvector: Utilities for formatting a listing column

Description

For vec_nlines, calculate the number of lines each element of a column vector will take to render. For format_colvector,

Usage

format_colvector(df, colnm, colvec = df[[colnm]])

vec_nlines(vec, max_width = NULL)

# S4 method for ANY vec_nlines(vec, max_width = NULL)

Value

a numeric vector of the number of lines elementwise that will be needed to render the elements of vec to width max_width.

Arguments

df

listing_df. The listing.

colnm

Column name

colvec

Column values based on colnm

vec

A vector.

max_width

numeric (or NULL). The width the column will be rendered in.