Learn R Programming

specmine (version 1.0)

read_dataset_csv: Read dataset from CSV

Description

Reads the data from a CSV file and creates the dataset.

Usage

read_dataset_csv(filename.data, filename.meta = NULL, type = "undefined", description = "", label.x = NULL, label.values = NULL, sample.names = NULL, format = "row", header.col = TRUE, header.row = TRUE, sep = ",", header.col.meta = TRUE, header.row.meta = TRUE, sep.meta = ",")

Arguments

filename.data
name of the data file.
filename.meta
name of the metadata file.
type
type of the data.
description
a short text describing the dataset.
label.x
the label for the x values.
label.values
the label for the y values.
sample.names
the names of the samples.
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.
header.col.meta
boolean value indicating if the metadata CSV file contains a header column with the name of the metadata variables.
header.row.meta
boolean value indicating if the metadata CSV file contains a header row with the name of the samples.
sep.meta
the separator character of the metadata file.

Value

Returns the dataset from the CSV file.

Examples

Run this code
## Not run: 
#   ## Example of reading a dataset from a CSV file
#   dataset = read_dataset_csv("data.csv", "metadata.csv", 
# 	    type = "nmr-spectra", 
# 	    description ="description of the dataset", 
# 	    label.x = "ppm", label.values = "intensity")
# ## End(Not run)

Run the code above in your browser using DataLab