Wday Us

0 views
Skip to first unread message

Enrique Fats

unread,
Aug 3, 2024, 5:07:26 PM8/3/24
to windtehotec

logical. Only available for wday. FALSE will display the day of the weekas an ordered factor of character strings, such as "Sunday." TRUE will display anabbreviated version of the label, such as "Sun". abbr is disregarded if label =FALSE.

day on which week starts following ISO conventions: 1 means Mondayand 7 means Sunday (default). When label = FALSE and week_start = 7, the numberreturned for Sunday is 1, for Monday is 2, etc. When label = TRUE, the returnedvalue is a factor with the first level being the week start (e.g. Sunday ifweek_start = 7). You can set lubridate.week.start option to control thisparameter globally.

Greetings lovely people of SO, I am currently working with a dataset that has columns for weekdays in a number format, for weekdays the number one represents Monday and 7 Sunday, preliminary I am trying to make use of some sort of library that can convert this numbers into string/text format for example if I were to pass the vector days I would like to get the number days as text form.

But what I really want to to have a function that will set one as mon by default in case I have to work in other machines , does someone knows how to properly change the parameters of the lubridate::wday function to get my desired output? Thank you so much guys.

It's worth mentioning that the weekdays result is locale-dependent. Non-English locales will use non-English names for week days, etc. If you want completely reproducible results, then construct w yourself.

c80f0f1006
Reply all
Reply to author
Forward
0 new messages