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

Jibrin Alhassan j|br|n@@|h@@@@n @end|ng |rom unn@edu@ng
Wed Jan 20 13:26:01 CET 2021

Hi Bert,
Thanks for your time. I will check some relevant tutorias. I am very

On Fri, Jan 15, 2021 at 7:49 PM Bert Gunter <bgunter.4567 using gmail.com> wrote:

> There are many good tutorials for R. As a "newbie", you need to avail
> yourself of them. Although this forum is meant to "help", it is not
> designed to provide tutorials. Understanding basic R functionality is
> largely assumed here.
> Searching on "tutorials on date-time data in R" brought up many
> possibilities. Choose one or more that best suits your needs.
> As for your specific query, you seem not to understand R's "vectorization"
> behavior: your statement, "it can only convert one day of the year at a
> time", is false. Again, search for a tutorial on "vectorization in R." But
> note that the "Intro to R" tutorial that ships with R already has this.
> Bert Gunter
> "The trouble with having an open mind is that people keep coming along and
> sticking things into it."
> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
> On Fri, Jan 15, 2021 at 9:55 AM Jibrin Alhassan <
> jibrin.alhassan using unn.edu.ng> wrote:
>> 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.

	[[alternative HTML version deleted]]

More information about the R-help mailing list