We currently get C++ compilation errors when the type of return does not match returnType. E.g.,
foo = nFunction(
fun = function() {
y <- rnorm(4)
return(y)
}, returnType = 'integerVector')
cfoo <- nCompile(foo)
I am not printing the error message on account of length, but it occurs with the Eigen code.
This also occurs in a way that will particularly confuse users in cases where they will probably expect integer type:
foo = nFunction(
fun = function() {
y <- 1:3
return(y)
}, returnType = 'numericVector')
cfoo <- nCompile(foo)
The above is fine, but if returnType = 'integerVector' (as an R user would generally do), then one gets the C++ compilation error.
We currently get C++ compilation errors when the type of
returndoes not matchreturnType. E.g.,I am not printing the error message on account of length, but it occurs with the Eigen code.
This also occurs in a way that will particularly confuse users in cases where they will probably expect integer type:
The above is fine, but if
returnType = 'integerVector'(as an R user would generally do), then one gets the C++ compilation error.