Description Usage Arguments Value Examples
View source: R/weekYColColsTabs.R
takes as input a vector containing date.frame object names (dfNameVec
), and a vector containing column names (dfColNameVec
) and inserts a new column in each data frame for each column in dfColNameVec
containing the week of the year corresponding to the entries in that column
1 | weekYColColsTabs(dfNameVec, dfColNameVec)
|
dfNameVec |
a string or a vector of class character indicating the name(s) of the data.frame object(s) to be used. |
dfColNameVec |
a string or a vector of class character indicating the name(s) of the column(s) to be handled. The entries in each of these columns must be dates in the date format "dd.mm.yyyy". |
the modified data.frame objects which now contain new columns containing the week of the year corresponding to the entries in the respective columns specified by dfColNameVec
of the original data frames. The entries in the new column are integers in the range [1,53]. If 1 January falls on either of Monday, Tuesday, Wednesday, Thursday then it belongs to week 1, otherwise week 53 of the last year. The first week of the year is the one that contains the first Thursday of the year.
1 2 3 | weekYColColsTAbs(c("rice","maize"),c("tillDate","plantDat","hrvDate"))
weekYColColsTabs(c("students"),c("start_date","date_of_birth"))
weekYColColsTabs("students",c("start_date","date_of_birth"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.