I get the following error message :
Error in \"if (reached.threshold < min.reached.threshold) {\" : missing value where TRUE/FALSE needed
I had the same error. The following worked with me: Try to set linear.output=F and scale the output afterwards.
linear.output=F