Error: object 'res.hcpc' not found when using FactoMineR

547 views
Skip to first unread message

johnmcauley

unread,
Feb 22, 2012, 4:57:55 AM2/22/12
to FactoMineR users
Hello all,

I am a new user so I hope this question is OK for the group.

I am using FactoMineR to carryout an analysis (PCA and agglomerative
hierarchical clustering) on a set of data. I am working my way
through the examples in the book "Exploratory Multivariate Analysis by
Example Using R", which is excellent by the way, but get the following
error when I try to reference the result object of a HCPC command
(res.hcpc).

Here is the commands I run:

library(FactoMineR)
temperature <- read.table("http://factominer.free.fr/book/
temperature.csv", header=TRUE, sep=";", dec=".", row.names=1) -- Get
the data
temperature <- read.table("http://factominer.free.fr/book/
temperature.csv", header=TRUE, sep=";", dec=".", row.names=1) -- Run
the PCA
res.hcpc <- HCPC(res.pca, nb.clust=0, conso=0, min=3, max=10) -- Run
HCPC

At this point, a dendrogram is displayed. However, R stalls until I
close the dendrogram.

Next, I call the res.hcpc object (res.hcpc$call$t) but get the
following error "Error: object 'res.hcpc' not found".

I think this could have something to do with the graphics capability
of R - http://support.rstudio.org/help/discussions/problems/558-error-in-function-only-one-rstudio-graphics-device-is-permitted.
However, I am not sure.

Am I doing something wrong? Or have I unwittingly uncovered a bug,
most probably the former.

Thank you,

Rgds,

John

P.s. I tried the web and the group but found nothing on this error.

johnmcauley

unread,
Feb 22, 2012, 5:02:39 AM2/22/12
to FactoMineR users
I think I solved my problem.

I need to examine the res.hcpc objects and not graph it, for it is
part of a larger visulisation program I am developing, so if I use the
following command, the res.hcpc object is available.

res.hcpc <- HCPC(res.pca, nb.clust=0, conso=0, min=3, max=10, graph=0)

This basically states to not graph the results of the HCPC, which then
is accessible.

I hope this is useful to someone else.

j

On Feb 22, 9:57 am, johnmcauley <johnmcau...@gmail.com> wrote:
> Hello all,
>
> I am a new user so I hope this question is OK for the group.
>
> I am using FactoMineR to carryout an analysis (PCA and agglomerative
> hierarchical clustering) on a set of data.  I am working my way
> through the examples in the book "Exploratory Multivariate Analysis by
> Example Using R", which is excellent by the way, but get the following
> error when I try to reference the result object of a HCPC command
> (res.hcpc).
>
> Here is the commands I run:
>
> library(FactoMineR)
> temperature <- read.table("http://factominer.free.fr/book/
> temperature.csv", header=TRUE, sep=";", dec=".", row.names=1)  -- Get
> the data
> temperature <- read.table("http://factominer.free.fr/book/
> temperature.csv", header=TRUE, sep=";", dec=".", row.names=1)  -- Run
> the PCA
> res.hcpc <- HCPC(res.pca, nb.clust=0, conso=0, min=3, max=10)  -- Run
> HCPC
>
> At this point, a dendrogram is displayed.  However, R stalls until I
> close the dendrogram.
>
> Next, I call the res.hcpc object (res.hcpc$call$t) but get the
> following error "Error: object 'res.hcpc' not found".
>
> I think this could have something to do with the graphics capability
> of R -http://support.rstudio.org/help/discussions/problems/558-error-in-fun....
Reply all
Reply to author
Forward
0 new messages