DF_verticalizer: Verticalizes a dataframe

View source: R/local_functions.R

DF_verticalizerR Documentation

Verticalizes a dataframe

Description

Takes a dataframe with a set of different columns containing numerical values to be verticalized, returns a vertical dataframe with all variables in a single column called "VAR" together with a "VAR_TYPE" column defining the type of variable for the given row, named after the column name found in horizontal dataframe.

Usage

DF_verticalizer(df_hor, vert_col)

Arguments

df_hor

Horizontal dataframe

vert_col

Vector of the names of the columns of numerical variables to be verticalized.

Value

A vertical dataframe containing the variables to be verticalized (column "VAR", numeric) and the name of the variable (column "VAR_TYPE", character strings).


isobxr documentation built on Aug. 23, 2023, 5:06 p.m.