1. Learn
  2. /
  3. Courses
  4. /
  5. R로 Shiny 웹 애플리케이션 만들기

Connected

Exercise

레이아웃(UI) 업데이트

Shiny에서 제공하는 layout 함수를 사용해 UI 요소를 배치할 수 있어요. 여기서는 입력을 sidebarPanel() 안에, 출력을 mainPanel() 안에 배치하는 sidebarLayout()을 사용하겠습니다. 아래 템플릿을 참고해 앱의 레이아웃을 업데이트해 보세요.

sidebarLayout(
  sidebarPanel(p("This goes into the sidebar on the left")),
  mainPanel(p("This goes into the panel on the right"))
)

shiny와 ggplot2 패키지는 미리 불러와 두었습니다. 참고로, p('hello')는 텍스트 "hello"가 들어간 HTML 문단을 반환합니다.

Instructions

100 XP
  • textInput()을 sidebarPanel() 안에 배치하세요.
  • plotOutput()을 mainPanel() 안에 배치하세요.
  • 두 패널을 사이드바 레이아웃에 넣으세요: sidebarLayout(___ , ___).