Learn R Programming

excelstrippr (version 0.1.2)

promote_colnames: Promote Row to Column Names

Description

Promote Row to Column Names

Usage

promote_colnames(.df, rownum = 1)

Arguments

.df

a data frame

rownum

numeric. The row in the data frame to be promoted to column names

Value

a data frame with the promoted row as column names

Examples

Run this code
# NOT RUN {
df <- data.frame(v1 = c("X", "123.45"), v2 = c("Y", "345.67"))
promote_colnames(df)
# }

Run the code above in your browser using DataLab