[R-sig-eco] pca in ade4

Finn Bastiansen Finn.Bastiansen at rifcon.de
Fri Nov 22 10:53:31 CET 2013


Dear Mahnaz,

I do not use that specific library, however, judging from the structure of the resulting object ("str(deug.dudi)") it only contains numerical data. However, a factorial variable is expected by the function you use ("factor expected for fac "). Thus you have to convert the respective variable to factors to make the function happy :-)

Have a look in the R documentation on how to do that:

?factor
?as.factor

Hope that helps,
Finn

RIFCON GmbH
Goldbeckstraße 13
D-69493 Hirschberg
Tel: +49-6201 84528-24
Email: finn.bastiansen at rifcon.de

RIFCON GmbH - Zinkenbergweg 8 - D-69493 Hirschberg
Goldbeckstraße 13 - D-69493 Hirschberg
Amtsgericht Mannheim - HRB 433053 - Ust.IdNr. DE 814188954 - www.rifcon.de
Geschäftsführer: Dr. Michael Riffel
Prokura: Jürgen Riffel / Dr. Jan-Dieter Ludwigs


-----Ursprüngliche Nachricht-----
Von: Mahnaz Rabbaniha [mailto:rab.mahnaz at gmail.com]
Gesendet: Freitag, 22. November 2013 10:39
An: r-sig-ecology
Betreff: [R-sig-eco] pca in ade4

Dear all

for pca on my data i used this code

deug.dudi <- dudi.pca(c(1:62), center =c(63),scale = FALSE, scan = FALSE)

s.class(deug.dudi$li, c(63), cpoint = 1)

but i take this message:

*Error in s.class(deug.dudi$li, c(63), cpoint = 1) : *
*  factor expected for fac*

please explain, what is meaning of this error


thanks
--
Mahnaz Rabbaniha
marine Ecologist, PhD
Iranian Fisheries Research Organization (IFRO)
P.O.Box: 14155-6116
Tehran, IRAN
Phone:   +98 21 44580953
Fax:       +98 21 44580583

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-ecology mailing list
R-sig-ecology at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


DISCLAIMER: This e-mail transmission may contain confide...{{dropped:13}}



More information about the R-sig-ecology mailing list