각 범주별 데이터 분석을 위한 nested data frame을 만든다. group_nest returns nested data frame that each row represents variable within each group.

group_nest(.data, .group_var, .xvar)

Arguments

.data

관측 데이터 프레임. A raw data frame.

.group_var

범주변수. A variable to group by.

.xvar

범주별 데이터 프레임에 포함될 변수. One or more variables separated by commas within c(). Each variable needs to be a numeric column of .data.

Value

두 개의 컬럼을 지닌 데이터 프레임으로, 첫 번째 컬럼은 범주변수 .group_var이며, 두 번째 컬럼 .new_col는 각 범주 내의 관측객체들에 대한 데이터 프레임으로, .xvar에 속한 변수들을 컬럼으로 지닌다.