add_column_after_specific_column: Add column after specific column

View source: R/DataReformatting.R

add_column_after_specific_columnR Documentation

Add column after specific column

Description

During the data processing, some new columns need to be added, with unit conversions or newly calculated values. This function allows us to add those columns in specific locations to make analysis easier.

Usage

add_column_after_specific_column(
  data,
  new_data,
  new_column_name = NULL,
  old_column_name,
  loop_structure
)

Arguments

data

The data containing the original columns

new_data

The new data which we want to include

new_column_name

The column name (or name pattern for loops) for the new data we would like to add

old_column_name

The marker column name (or name pattern for loops) where we want to add the new data

loop_structure

A boolean indicating whether this information is in a loop format (TRUE) or a single pair of variables (FALSE)

Details

Rpackage file: DataReformatting.R


l-gorman/rhomis-R-package documentation built on Nov. 8, 2023, 6:46 a.m.