I was instructed by the book Analyzing Financial Data and Implementing Financial Models Using R (Clifford S. Ang 2015, chapter 8) to download the USA real GDP data from IMF website https://www.imf.org/en/home. The downloaded file is a .xls, and I converted it to .csv under the name "USRGDP IMF WEO.csv" as instructed.
Then, when I ran the codes on R, the numeric data in the .csv file reversed itself, with semicolons appeared. Illustration is as below:
The original file's number format (when opened by Excel):
The code:
library(quantmod) us.rgdp <- read.csv("USRGDP IMF WEO.csv", header = FALSE)
The output:
What can be done to fix the data? Thank you, from a beginner to R.