Description Usage Arguments Value Errors Examples
View source: R/extract_numeric_columns.R
This function returns all of the columns of the given dataset
whose values are numeric or have a
meaningfull numerical equivalent. If isCSV
is TRUE
, then dataset
is taken a string
depicitng the name of a CSV file. with_bool
specifies if booleans are taken as numeric as well.
1 2 |
dataset |
A DataFrame of Data.Table object whose columns will be inspected for numeric values.
If |
isCSV |
bool. If |
columns |
vector list of column names to coerce which columns the analysis will apply to. The given
|
row_names |
bool or integer. Only applied when |
with_bool |
bool. Specifies whether we consider booleans as numeric values. |
header |
bool. Same Parameters as that in |
This function returns a Data Frame object, with row names given based on the row_names
argument.
It includes all the columns of the given dataset whose elements are all numeric or have
a meaningful numerical equivalent.
extract_numeric_columns
won't be able to detect numeric values in columns of
data type factor
. If a numeric column is being read from a csv as factor by this function,
then the dataset must be given as data table or data frame object (isCSV = FALSE).
1 2 3 4 5 6 7 | ## Not run:
extract_numeric_columns(mtcars)
extract_numeric_columns(mtcars, columns = c("mpg", "cyl"))
extract_numeric_columns("test_data_1.csv", isCSV = TRUE)
extract_numeric_columns("test_data_2.csv", isCSV = TRUE, row_names = TRUE, with_bool = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.