Read CSV data

Share:

Description

Reads the data from the CSV file.

Usage

1
2
read_data_csv(filename, format = "row", header.col = TRUE, 
header.row = TRUE, sep = ",")

Arguments

filename

name of the file with the data.

format

format which the data are in the CSV file. It can be "row" if the samples are in the rows or "col" if the samples are in the columns.

header.col

boolean value indicating if the CSV contains a header column with the names of the samples or variables.

header.row

boolean value indicating if the CSV contains a header row with the names of the samples or variables.

sep

the separator character.

Value

Returns a numeric matrix with the data.

Examples

1
2
3
4
5
## Not run: 
  ## Example of reading a dataset from a CSV file
  data.matrix = read_data_csv("data.csv", format = "row")

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.