readComparisonFile: Read data from a comparison file

Description Usage Arguments Value See Also Examples

View source: R/loading_functions.R

Description

This function reads the data from a files where two or more algorithms are compared in different problems. The file can have some columns that characterize the problem and one column per algorithm. If each row contain only the result obtained by one algorithm, use the readExperimentFile function.

Usage

1
readComparisonFile(file, alg.cols, col.names = NULL, ...)

Arguments

file

Path of the file to load

alg.cols

A vector column names or indices inicating which columns contain the results. The rest are assumed as descriptors of the problems

col.names

Vector of names of the columns. If not NULL, the files are assumed not to have a header and the columns are named using this vector

...

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

readExperimentFile, readExperimentDir, 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_comparison.out" , sep="/")
data <- readComparisonFile(file=file, alg.cols=3:10)
dim(data)
head(data)

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