휴머니즘

  • 홈
  • 태그
  • 방명록

ggplot 2

데이터 시각화(Geometric objects)

1. Run this code in your head and predict what the output will look like. Then, run the code in R and check your predictions ggplot(data = mpg, mapping = aes(x = displ, y = hwy, color = drv)) + geom_point() + geom_smooth(se = FALSE) 이 코드에서 눈여겨볼 점은 Aesthetic을 ggplot에 맵핑했다는 것이다. 이렇게 되면 뒤에 여러 개의 geom을 붙였을 때 굳이 다 변수를 설정하지 않아도 된다. 즉, 전역 변수로 설정이 돼서 geom을 빈칸으로 놔둬도 데이터가 적용이 된다는 것이다. 데이터를 mpg로 하고 x값에 dis..

R study 2023.02.23

데이터 시각화(Aesthetic Mappings)

1. What’s gone wrong with this code? Why are the points not blue? library(tidyverse) ggplot(data=mpg)+ geom_point( mapping=aes(x=displ,y=hwy,color="blue") ) Aesthetic이라는 개념을 약간이나마 이해하는데 이 문제가 많은 도움을 줬다. Aesthetic은 시각적인 표현을 나타내는 것이다. "심미성"이라고 번역되지만 한국어임에도 직관적이지 못한 표현이다. 그냥 간단하게 데이터를 눈에 보이게 해주는 장치라고 이해했다.(아닐 수도 있다...) 이 문제의 요점은 Aesthetic이 데이터를 어떻게 보여주는지에 대한 것이다. Aesthetic은 대게 mapping과 함께 쓰인다. 여기서 ..

R study 2023.02.22
이전
1
다음
더보기
프로필사진

나와 너를 이해하는데 데이터 분석이 도움되지 않을까 하여 만들어진 곳

  • 분류 전체보기
    • R study
    • HR analytics

Tag

group_by(), grid.arrange, geom_smooth, tidyr, gather(), localdata, readxl, HRD의 목적, filter(), summarise, facet_grid, grid.arrange(), gridExtra, ggplot, summarise(), 공공데이터, facet_wrap, 교육실시율, group_by, gsub(),

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/05   »
일 월 화 수 목 금 토
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바