On 30.03.2017 23:34, Paul Bernal wrote:
Hello everyone,

Is there a way to use the function seq to generate a date sequence in
this kind of format: jan-2007?

format(seq(ISOdate(2017,1,1), ISOdate(2017,12,31), "months"), "%b-%Y")


Also, is there a way to change the Sys.Date() format to the one
mentioned above (jan-2007)?

format(Sys.Date(), "%b-%Y")

see ?strptime for details.

Thomas


Thanks in advance for your valuable help,

Best regards,

Paul

______________________________________________
R-help@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.

Reply via email to