R Markdown
R Markdown
# Install and load necessary packages
if (!require("pacman")) install.packages("pacman")
## Loading required package: pacman
pacman::p_load(readr, tidyverse)
# --- TASK 1: Import data from downloaded CSV file ---
# A window will pop up. Please select your downloaded TEJ market data file.
taiwan_market_data <- read_csv(file.choose())
## Rows: 3507 Columns: 4
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (2): COID, COID_Name
## num (1): Close(NTD)
## date (1): Date
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
# --- TASK 2: Show the first few rows of the dataset ---
head(taiwan_market_data)
## # A tibble: 6 × 4
## COID COID_Name Date `Close(NTD)`
## <chr> <chr> <date> <dbl>
## 1 00653L Fubon NIFTY 2X ETF 2026-10-05 40.7
## 2 00654R Fubon NIFTY-1X ETF 2026-10-05 7.18
## 3 00688L Cathay 20+ 2X ETF 2026-10-05 5.68
## 4 00786B YT USDBANK 2026-10-05 30.4
## 5 1445 UNIVERSAL 2026-10-05 9.98
## 6 6582 Shin Foong 2026-10-05 31.4