df_add_affix: Add affix to column names.

df_add_affixR Documentation

Add affix to column names.

Description

Add a prefix to column names on data.frame or matrix or similar.

Usage

df_add_affix(data, prefix = "", suffix = "")

Arguments

data

(an object) An object whose colnames should be changed

prefix

(str) A prefix to add.

suffix

(str) A suffix to add.

Examples

test_iris = iris[1:10, ] #small test dataset
df_add_affix(test_iris, prefix = "P_") #ad P_ prefix
df_add_affix(test_iris, suffix = "_S") #ad _S suffix

Deleetdk/kirkegaard documentation built on May 8, 2024, 12:27 a.m.