Message-ID: <CAM_vjumF7Q0rt=yEDwhXkneZ_TKqQRyr6bkrpNG8nTki58w=Uw@mail.gmail.com>
Date: 2016-03-27T16:20:08Z
From: Sarah Goslee
Subject: Issue with var command in stats package
In-Reply-To: <F26D18C3423DD149B0C3203622C7270F06D62A10@HQNEX1.anser.org>
Somewhere you'd named an R object var, which is also the name of the function.
There's no way to access part of a function with $ so
var$contrib
is throwing the closure error, which is telling you that you can't
index a function.
Sarah
On Sun, Mar 27, 2016 at 12:14 PM, John, Larry <Larry.John at anser.org> wrote:
> Am using R version 3.2.4 in a fully updated version of Windows 7 and the most current versions of coorplot, FactoMineR and factoextra to support multiple correspondence analysis. However, today, a line of code that worked just fine on one set of data produced an error message on a different set of data.
>
> Specifically, when I ran:
>
> corrplot(var$contrib, is.corr = FALSE)
>
> I received the following message:
>
>> corrplot(var$contrib, is.corr = FALSE)
> Error in var$contrib : object of type 'closure' is not subsettable
>
> Can you please tell me what this error message means and roughly what I might need to do to correct it? If necessary, I can provide the original data files.
>
> Many thanks for your kind help.
>
> Very Respectfully,
>
> Larry John
> Principal Analyst
> ANSER