readExperimentFile: Read data from an experiment-like file

Description Usage Arguments Value See Also Examples

Description

This function reads the data from a file where each row is an experiment characterized by some variables (one of which should be the algorithm used) and with one and only one numeric result. For files where there is more than one result per line see readComparisonFile.

Usage

1
readExperimentFile(file, alg.col, value.col, col.names = NULL, ...)

Arguments

file

Path to the file to read.

alg.col

Name or index of the column corresponding to the algorithm used in the experiment.

value.col

Name or index of the column corresponding to the numerical result of the experiment.

col.names

Vector of names for the columns. If not provided (or NULL) the names will be read from the first line of the file.

...

Additional parameters for the read.csv function used to load the data. It can be used, for example, to set the separator (e.g., sep="\t"). Note that the header argument is automatically set according to the col.names argument.

Value

A data.frame where each column represents either a feature of the experiment or the result of running an algorithm. Algorithm columns are placed always at the end of the table.

See Also

readExperimentDir, readComparisonFile, readComparisonDir and the vignette vignette(topic="Data_loading_and_manipulation", package="scmamp")

Examples

1
2
3
4
5
dir <- system.file("loading_tests",package="scmamp")
file <- paste(dir , "rgg_complete_experiment.out" , sep="/")
data <- readExperimentFile (file=file, alg.col="Algorithm", value.col="Evaluation")
dim(data)
head(data)

scmamp documentation built on May 1, 2019, 10:10 p.m.