Problem on Converting "day of year" to "year", "month" and "day" has been solved
Dear R users,
I want to thank you all for your contributions to the problem I posted. It has been solved. Find below the code that solved the problem.
df1 <- read.table("SWS1998_2002", header = TRUE)
df1$date <- as.Date(paste(df1$year, df1$day),
format = "%Y %j",
origin = "1998-01-01")
df2 <- df1[c("date", "Dst")]
head(df2)
#To display all the rows
print(df2
Thanks,
Jibrin Alhassan