Description Usage Arguments Examples
View source: R/convert_to_df.R
Convert selected values to target value. Input and output are both dataframes.
By default 0 is replaced with NA
. Non-numeric column names should be included in the exclusion
argument. Columns can be selected either by exact name matching or by partial matching. For
partial matching turn complete_match = FALSE
.
1 2 | convert_to_df(x, lab = "", value = 0, to = NA, exclusion = c(),
complete_match = TRUE)
|
x |
A dataframe with values. |
lab |
Label to be added in each column after conversion. By default nothing is added. |
value |
Value to be changed. Default is 0. |
to |
Target value. Default is |
exclusion |
Vector containing labels from the columns that should be excluded. Even a partial match is enough. |
complete_match |
Logical with default value |
1 | new_data <- convert_to_df(x, value = 0, to = NA, exclusion = c(<e2><80><9c>Protein<e2><80><9d>, <e2><80><9c>pept<e2><80><9d>))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.