R colMeans()

Jmnote (토론 | 기여)님의 2021년 4월 13일 (화) 22:44 판 (→‎개요)

1 개요

R colMeans()
  • Form Column Means
df <- read.table( header=TRUE, stringsAsFactors=FALSE, text="
English Math
     30   60
     40   70
     50   80
     60   90
")
df
colMeans(df)
sapply(df, mean)

<syntaxhighlight lang='r' notebook> apply(df, 2, mean) </source>

2 같이 보기

3 참고

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