Skip to contents

Reads either an .xlsx or a .csv file into a table

Usage

load_file(path, filetype = ".xlsx", col_names = TRUE)

Arguments

path

path for the file (required)

filetype

set whether to read an .xlsx file or a .csv file. It takes either ".xlsx" or ".csv". By default, it is set to ".xlsx" (optional)

col_names

Either TRUE, FALSE or a character vector of column names. If TRUE, the first row of the input will be used as the column names, and will not be included in the data frame. If FALSE, column names will be generated automatically: X1, X2, X3 etc. If col_names is a character vector, the values will be used as the names of the columns, and the first row of the input will be read into the first row of the output data frame.

Value

Returns data in the form of a tibble object.