uniquewt.df: Elimination of Duplicated Rows in a Array

Description Usage Arguments Value Author(s) Examples

Description

An utility function to eliminate the duplicated rows in a array.

Usage

1

Arguments

x

a data frame which contains duplicated rows

Value

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

Author(s)

Daniel Chessel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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

ade4 documentation built on May 2, 2019, 5:50 p.m.

Related to uniquewt.df in ade4...