Adding cognostics
Let's practice custom cognostics by taking the by_symbol data merged with the stock metadata creating a cognostic for the log market capitalization.
แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร
Visualizing Big Data with Trelliscope in R
คำแนะนำการฝึกหัด
- Use
mutate()to create a new variable,market_cap_log, which is the base 10 logarithm ofmarket_cap. - Use the
cog()wrapper function to provide a custom description for the cognostic,"log base 10 market capitalization".
แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ
ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์
library(trelliscopejs)
library(dplyr)
# Create market_cap_log
by_symbol <- mutate(by_symbol,
___ = cog(
val = ___(___),
___ = "log base 10 market capitalization"
)
)