There's some issue with the returnType here. The code runs but emits the warning below.
nc <- nClass(
Cpublic = list(
run = nFunction(
fun=function(mystr = 'string'){
return(mystr)
}, returnType = 'string'
)))
cnc <- nCompile(nc)
Warning message:
Scalar type (string) for return() does not perfectly match the nFunction's return type (string).
This occurred for: return(mystr)
This was part of the call: {
return(mystr)
}
I haven't investigated but would be happy to look into this at some point.
There's some issue with the returnType here. The code runs but emits the warning below.
I haven't investigated but would be happy to look into this at some point.