group-p: Adds proportion of occurrences to each level names

Description Usage Arguments Details Author(s) See Also Examples

Description

Adds the proportion of occurrences of each level to the corresponding level name.

Usage

1

Arguments

group

A group variable.

weights

Vector of weights of same length as the group variable.

Details

The group variable can be a factor or a numerical variable. In the latter case it is transformed to a factor.

Author(s)

Gilbert Ritschard

See Also

seqplot.

Examples

1
2
3
4
5
6
data(actcal)
actcal <- actcal[1:100,]
actcal.seq <- seqdef(actcal[,13:24])
seqdplot(actcal.seq, group=group.p(actcal$sex))

levels(group.p(actcal$sex, weights=runif(length(actcal$sex))))

TraMineRextras documentation built on April 15, 2017, 10:55 a.m.

Search within the TraMineRextras package
Search all R packages, documentation and source code