pixiedust (version 0.1.1)

sprinkle_colnames: Column Names for dust Tables

Description

Assigns new column names to a table

Usage

sprinkle_colnames(...)

Arguments

...
Column names for the table. See 'Input Formats'

Input Formats

  • named arguments
{ Using dust_colnames(term = "Term", estimate = "Estimate"), column names may be passed for all or a subset of the columns. The existing column name will be matched against the argument name.} unnamed arguments{ Using dust_colnames("Term", "Estimate", "SE", ...), column names may be passed for all of the columns. If the arguments are unnamed, the number of arguments passed must match the number of columns in the table.}

Examples

Run this code
x <- dust(lm(mpg ~ qsec + factor(am), data = mtcars))
x
x + sprinkle_colnames(term = "Term", statistic = "T")
x + sprinkle_colnames("Term", "Estimate", "SE", "T-statistic", "p-value")
# Causes an error due to too few unnamed arguments
x + sprinkle_colnames("Term", "Estimate")

Run the code above in your browser using DataLab