เริ่มต้นใช้งานเริ่มต้นใช้งานได้ฟรี

A fancy stock chart

It's time to bring together what you have learned so far to create a chart that could go onto a publication.

In this exercise, you will plot Microsoft and Citigroup stock prices on the same chart. You are provided with the same dataset, data, as before.

แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร

Visualizing Time Series Data in R

ดูคอร์ส

คำแนะนำการฝึกหัด

  • Plot the "microsoft" series in data and add the title "Dividend date and amount"
  • Without creating a new plot, add the "citigroup" series to the plot, and make its line "orange" and twice as thick as the default width
  • Add an appropriately scaled Y axis on the right side of the chart for the "citigroup" data using axis() and pretty(), and make it orange

แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ

ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์

# Plot the microsoft series


# Add the citigroup series


# Add a new y axis for the citigroup series
แก้ไขและรันโค้ด