View source: R/dataframe_helpers.R
df_read_table | R Documentation |
df_read_table
Reads a data frame from a file and possibly convert integer columns to
numeric. This function calls the built-in read.table()
method and
then W4MRUtils::df_force_numeric()
.
df_read_table(file, force_numeric = FALSE, ...)
file |
The path to the file you want to load. See
|
force_numeric |
If set to TRUE, all integer columns will be converted to numeric. |
... |
Parameter to transmit to the read.table function. |
The loaded data frame.
# Load a data frame from a file and convert integer columns
file_path <- system.file(
"extdata",
"example_df_read_table.csv",
package="W4MRUtils"
)
str(W4MRUtils::df_read_table(
file_path,
sep = ",",
force_numeric = TRUE,
header=TRUE
))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.