divide_cols_by | R Documentation |
divide_cols_by
takes a data frame
or tibble
object,
a set of column names in a vector, any real number and divides the values
in the cols argument by that number and returns the tbl.
divide_cols_by(data = NULL, cols = NULL, by = 100)
data |
Data frame or tibble object |
cols |
Vector of one or more columns in |
by |
Number to divide by. Default is 100 |
Used in scripts: Robust function: FALSE
TO IMPROVE:
Check that data is not NULL, if return NULL
Make column names not case sensitive
Check which column(s) are and are not in the dataset, throw warning if any are missing, and operate only on those that are in the dataset
Check the classes of the passed columns to ensure they are numeric and
possible to divide by by
. If not attempt to convert to numeric, else
throw a warning that those columns are not operated on
Data frame
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.