cols_pad: Add Variables to ease data usage in a Pivot Table
Description
Adds dummy columns to reach the number specified by the user.
this is mostly useful to ensure straightforward and easy data updating when
using pivot tables in Excel. It allows replacement of the previous data sheet
by the new one, without having to take care about the number of columns, which
will always be the same.
Usage
cols_pad(data, nCols = 100, colPrefix = "x_")
Value
A data frame with the specified total number of columns.
Arguments
data
The data frame to which dummy columns will be added.
nCols
the total number of columns required : default is 100
colPrefix
A string used as the prefix for the names of dummy columns.