Learn R Programming

PCAmixdata (version 2.1)

Cut.Group: Cut.Group

Description

Cut a data frame into differents G data frames

Usage

Cut.Group(base, group, name.group)

Arguments

base
the data.frame to be split with n rows and p columns
group
a vector of size p whose values indicate at which group belongs each variable
name.group
a vector of size G which contains names for each group we want to create

Value

  • list.groupa list with each group created

Examples

Run this code
data(decathlon)
Cut.Group(decathlon,group=c(rep(1,10),2,2,3),name.group=c("Epreuve","Classement","Competition"))

Run the code above in your browser using DataLab