R split()

Jmnote (토론 | 기여)님의 2019년 4월 3일 (수) 23:50 판 (→‎개요)

1 개요

R split()
myData <- read.table(header=TRUE,text="
id freq ratio group
1  100  18.2  A
2  90   16.4  A
3  80   14.5  A
4  70   12.7  A
5  60   10.9  B
6  50   9.1   B
7  40   7.3   B
8  30   5.5   C
9  20   3.6   C
10 10   1.8   C
")

split(myData, myData$group)
null<-"
$A
  id freq ratio group
1  1  100  18.2     A
2  2   90  16.4     A
3  3   80  14.5     A
4  4   70  12.7     A

$B
  id freq ratio group
5  5   60  10.9     B
6  6   50   9.1     B
7  7   40   7.3     B

$C
   id freq ratio group
8   8   30   5.5     C
9   9   20   3.6     C
10 10   10   1.8     C
"

2 같이 보기

3 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}