uniquewt.df | R Documentation |
An utility function to eliminate the duplicated rows in a array.
uniquewt.df(x)
x |
a data frame which contains duplicated rows |
The function returns a y
which contains once each duplicated row of x
.
y
is an attribut 'factor' which gives the number of the row of y
in which each row of x
is found
y
is an attribut 'length.class' which gives the number of duplicates in x
with an attribut of each row of y
with an attribut
Daniel Chessel
data(ecomor) forsub.r <- uniquewt.df(ecomor$forsub) attr(forsub.r, "factor") forsub.r[1,] ecomor$forsub[126,] #idem dudi.pca(ecomor$forsub, scale = FALSE, scann = FALSE)$eig # [1] 0.36845 0.24340 0.15855 0.09052 0.07970 0.04490 w1 <- attr(forsub.r, "len.class") / sum(attr(forsub.r,"len.class")) dudi.pca(forsub.r, row.w = w1, scale = FALSE, scann = FALSE)$eig # [1] 0.36845 0.24340 0.15855 0.09052 0.07970 0.04490
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.