checkMixtureFile: Load and check a mixture file

View source: R/checkMixtureFile.R

checkMixtureFileR Documentation

Load and check a mixture file

Description

Given a mixture file name, returns the loaded data frame along with any detected errors or warnings.

Usage

checkMixtureFile(filename)

Arguments

filename

Path of the mixture file

Details

If warnings are found, the function attempts to fix them and explains what it has done in the warning messages. If an error is found, checking stops and a NULL data frame is returned. The error is described in the error messages.

Value

A list containing

  • df The loaded data frame, NULL if errors are present.

  • warning A list of strings describing the errors that ocurred but could be fixed or that do not prevent the execution of the program.

  • error A list of strings describing the errors that occurred that made it impossible to return a valid data frame. If this list is not empty, then the data frame item will be null.

Author(s)

Elias Hernandis

Examples

## Not run: 
mixfile <- system.file("extdata","mixture.txt",package="relMix")
result <- checkMixtureFile(mixfile);
print(result$df);
print(result$warning);
print(result$error);

## End(Not run)

gdorum/relMix documentation built on April 17, 2024, 8:49 p.m.