View source: R/preprocess-and-validate-data.R
read_data | R Documentation |
Reads data from a file based on its format (Excel or CSV).
read_data(file_path)
file_path |
Character string specifying the path to the input file. |
This function determines the file format based on the file extension and uses appropriate methods to read data from either Excel (xls, xlsx) or CSV (csv, txt) files.
A data frame containing the read data.
# Read data from an Excel file
read_data(system.file("extdata", "example.xlsx", package = "CBASSED50"))
# Read data from a CSV file
read_data(system.file("extdata", "example.csv", package = "CBASSED50"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.