Skip to content
Prev 54284 / 63424 Next

Cannot Compute Box's M (Three Days Trying...)

On 28/10/2017 6:26 AM, Morkus wrote:
You were trying to eval an expression that you constructed in Java.  I 
was suggesting that before you eval it, you print it.
Right, that's what I was suggesting you do. Now you've fixed the syntax 
error, that looks okay.

If I'm reading these messages in the right order, your latest error is

   Error in `[.data.frame`(boxMVariable, , -5) : undefined columns selected

The expression there is a funny way of printing boxMVariable[,-5].  So 
now you need to figure out why it thinks you've selected undefined 
columns.  This is a little perplexing, because you're asking for all 
columns except column 5, and that works whether or not you have a column 
5.

So I'd guess there's something weird about boxMVariable.  You should ask 
R to print it, and to print str(boxMVariable), to make sure it's a 
regular dataframe containing 4 numeric columns and one factor or 
character column.

Duncan Murdoch
Message-ID: <abfb1feb-1da9-8c88-ceb5-98cef28ef406@gmail.com>
In-Reply-To: <P6V3IIqCfJ4SUFtNl9ML3Wmo2cvnL50vlzlUJdvRaAj106MjIojw5ITRt5ZQdkeOa9rnyS6HTxRgg7SUwmPY4CqGPbQFWqYEKCTr_yDVZdM=@protonmail.com>