to_cols: Split a character into columns for terminal output

View source: R/utils.R

to_colsR Documentation

Split a character into columns for terminal output

Description

Split the string into n columns, then glue the columns together row-wise with space_between, then glue the rows together with new line characters.

Usage

to_cols(strings, n_cols = 2, space_between = "       ")

Arguments

strings

The strings to divide into columns.

n_cols

The number of columns.

space_between

What to put between the columns.

Value

A string that prints to the terminal as columns.


UCLATALL/coursekata-r documentation built on Aug. 24, 2023, 8:54 p.m.