[R] Converting "day of year" to "year", "month" and "day"

Rui Barradas ru|pb@rr@d@@ @end|ng |rom @@po@pt
Fri Jan 15 19:15:02 CET 2021


No dataset was attached. Like the posting guide says,

No binary attachments except for PS, PDF, and some image and archive 
formats (others are automatically stripped off because they can contain 
malicious software). Files in other formats and larger ones should 
rather be put on the web and have only their URLs posted. This way a 
reader has the option to download them or not.

Can you post sample data? Please post the output of `dput(df)`. Or, if 
it is too big the output of `dput(head(df, 20))`. (`df` is the name of 
your dataset.)

Hope this helps,

Rui Barradas

Às 11:30 de 15/01/21, Jibrin Alhassan escreveu:
> Dear R users,
> I am very new to R software. I have solar wind speed data needed for my
> work. How do I convert day in the year to year, month, and day with R
> software? I have used this code
> as.Date(0, origin = "1998-01-01")
> but it can only convert one day of the year at a time. Meanwhile, I have up
> to the 1998-2002 data set. Attached is my data.
> Kindly help, please.
> Jibrin Alhassan
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list