Learn R Programming

spectrino (version 2.0.0)

spnIsError: Check for spectrino error in a function result

Description

Checking if the result of spectrino function is error. In your code, it's a good practice to check the result from any spectrino function (except for spnNew, spnFree and spnCheck). From command line there is no sense to call this function because you would see the error message on the terminal.

Usage

spnIsError(rslt)

Arguments

rslt

check if rslt is character and if it is, if it is an error message (starts with Error:)

Value

spnIsError returns logical for spectrino error.

Examples

Run this code
# NOT RUN {
spnNew() 

# generate test set
spnOpenTree("<test>")

# all the specs from all the groups (excluding "unknowns" group, if any)
m1 <- spnGetTree(FALSE) 

# is there an error 
spnIsError(m1)

# Release of Spectrino
#spnFree(TRUE)
# }

Run the code above in your browser using DataLab