make_mult_col: Returns dataframe with multiple sets of the original columns...

View source: R/make_mult_col.R

make_mult_colR Documentation

Returns dataframe with multiple sets of the original columns (cols) made from the original dataframe columns.

Description

Thus, a 10 row 1 column dataframe becomes a 4 row 3 column dataframe with 2 NA values added to fill out the end of the new dataframe. This is used to reduce the length of very narrow dataframes.

Usage

make_mult_col(.df, cols = 1)

Arguments

.df

dataframe

cols

number of set of columns to be made

Examples

df <- data.frame(a = 1:5, b = letters[1:5], c = LETTERS[1:5])
make_mult_col(df, 2)

rmsharp/rmsutilityr documentation built on Feb. 13, 2024, 6:01 p.m.