namepref0: Add variable name prefix (without substitution)

View source: R/namepref.R

namepref0R Documentation

Add variable name prefix (without substitution)

Description

This function adds the new prefix and changes the dataframe's names to the new ones.

Usage

namepref0(dataframe, pref_new)

Arguments

dataframe

A dataframe

pref_new

New prefix character to add to all variable namess in the dataframe have

Value

Returns dataframe with all variables renamed to start with the new prefix.

Examples

bla <- tibble::tibble(x_ar = 1:5, y_ar = 6:10)
blo <- namepref0(bla, "var")
names(bla)
names(blo)


rextor documentation built on May 21, 2026, 5:09 p.m.