read.data {hclusteasy} | R Documentation |
Read Files in txt, xls, or xlsx Formats
Description
Read datasets files in txt
(space-separated), xls
or xlsx
and return the data as a data.frame
.
Usage
read.data(path, col.names = FALSE, col.types = NULL)
Arguments
path |
Path to the |
col.names |
Logical value indicating whether the first row
of the dataset should be used as column names. Use |
col.types |
Character or a character vector specifying the data types
for each column. Possible values are: "skip" , "guess" , "logical" ,
"numeric", "date" , "text" , or "list" . Default, it is |
Value
Dataset in data.frame
format.
Examples
# Load the package
library(hclusteasy)
# Set the file path
file_path <- system.file("extdata",
"iris_uci.xlsx",
package = "hclusteasy")
# Read a .xlsx dataset
iris <- read.data(file_path,col.names = TRUE)
[Package hclusteasy version 0.1.0 Index]