tryFunc {TooManyCellsR} | R Documentation |
This function will fail gracefully instead of stopping the program with an error.
tryFunc(f, file)
f |
The function to use. |
file |
The input file to be read. |
The imported data frame or NULL if an error occurred.
input <- system.file("extdata", "mat.csv", package="TooManyCellsR")
fail = tryFunc(read.csv, "fail.csv")
fail
success = tryFunc(read.csv, input)
success