TobiasMadsen / dgRaph

Discrete factor graphs in R
3 stars 2 forks source link

Check of range of data can fail for a matrix #19

Closed TobiasMadsen closed 8 years ago

TobiasMadsen commented 8 years ago

Call to sapply gives vector of length nrow(data) for data.frame but a vector of length nrow(data)*ncol(data) for matrices.

 if( ! suppressWarnings( all( sapply(data, max, na.rm = T) <= dfg$varDim) ) )
    stop("Data outside range")