[R] Problem on Converting "day of year" to "year", "month" and "day" has been solved

Jibrin Alhassan j|br|n@@|h@@@@n @end|ng |rom unn@edu@ng
Thu Jan 21 11:42:55 CET 2021


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

	[[alternative HTML version deleted]]



More information about the R-help mailing list