read_data {CBASSED50} | R Documentation |
Read Data Function
Description
Reads data from a file based on its format (Excel or CSV).
Usage
read_data(file_path)
Arguments
file_path |
Character string specifying the path to the input file. |
Details
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.
Value
A data frame containing the read data.
Examples
# 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"))
[Package CBASSED50 version 0.2.0 Index]