library(shiny)
## Warning: package 'shiny' was built under R version 4.4.2
library(plotly)
## Warning: package 'plotly' was built under R version 4.4.2
## Loading required package: ggplot2
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(NSO1212)
## Warning: package 'NSO1212' was built under R version 4.4.2
all.tables <- all_tables()
m2 <- get_table(
  tbl_id = "DT_NSO_0700_001V2",
  PERIOD = make_period(start = "201711", end = "202103", period = "M"),
  CODE = c("1")
)


m2 <- m2 %>%
  mutate(
    Year = substr(Period, 1, 4),  # Он
    Month = substr(Period, 5, 6),  # Сар
    Date = as.Date(paste(Year, Month, "01", sep = "-"), format = "%Y-%m-%d")  # Огноо формат
  )

Чи мөнгөний нийлүүлэлт юм уу ….

plot_ly(m2, x = ~Date, y = ~DTVAL_CO, type = "scatter", mode = "lines+markers",
            line = list(color = "#1f77b4", width = 2),
            marker = list(size = 8, color = "#ff7f0e"),
            name = "Мөнгө М2 (тэрбум ₮)") %>%
      layout( xaxis = list(title = "Сар", tickformat = "%Y-%m"),
        yaxis = list(title = "Мөнгө М2 (тэрбум ₮)"),
        hovermode = "x unified",
        showlegend = TRUE
      )

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.