I have a matrix of 5659 rows and 42 columns. The first column has the date as a numeric, and the rest columns consist of different country exchange rates also as numeric. firstly, I want to compare the First column(dates for a certain time) with 2nd column USD exchange rates and plot the graph; I am trying with this
date <- as.Date(x[, 1], origin = "2020-01-01"
# condition for date want to use is date >= "2020-01-01" & date <= "2020-12-31"
usd <- x[, "USD"]
z <- x[date >= "2020-01-01" & date <= "2020-12-31", "USD"]
plot(date, usd, type = "l", lty = 1,col = "blue" , main = "20-01-01 To 2020-12-31 Euro
to Usd Exchange Rate",xlab = "Date", ylab = "Exchange Rate")
Unable to get the desired output. Can someone guide me, please?