Description Usage Arguments Details Value Note Author(s)
Return a vector of possible dates in a semester or quarter in a year.
1 | semester_quarter(df, year, previous = FALSE, semester = NULL, quarter = NULL)
|
df |
dataset to obtain the dates |
year |
year that we want to obtain the vector |
previous |
If we want to obtain the semester or quarter from the previous year |
semester |
Number of the semester that we want to obtain the vector 1:2 |
quarter |
Number of the quarter that we want to obtain the vector 1:4 |
This function allows you to return a vector of dates from a semester or quarter of a year (or the previous year)
"This function returns different results based on the arguments select_year, select_month & previous".
If previous = FALSE and semester return a vector of dates of that semester of the year select_year in the date variable.
If previous = TRUE and semester return a vector of dates of that semester of the previous year select_year in the date variable.
If previous = FALSE and quarter return a vector of dates of that quarter of the year select_year in the date variable.
If previous = TRUE and quarter return a vector of dates of that quarter of the previous year select_year in the date variable.
If semester and quarter are selected both, then return a string message.
If there is something wrong with the year and/or previous option defined in the firm, then return a string message.
If there is no dates in the semester or quarter defined, then return a string message.
Eduardo Trujillo
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.