Description Usage Arguments Value Examples
View source: R/generate.columns.from.date.R
Function generate.columns.from.date
creates new column from original one
written in the format YYYY-MM-DD, using Brazilian epidemiological week system
1 | generate.columns.from.date(df.in, target.col)
|
df.in |
Data frame object |
target.col |
Name or position of column with values of type Date or character in the format %Y-%m-%d |
generate.columns.from.date
returns a new data frame with same columns of df.in plus columns epiyear, epiweek,
epiyearweek. epiyearweek has the format %Y'W'%w (e.g., 2009W42)
1 2 | df <- data.frame(list(date=c('2009-08-01', '2009-09-01', '2009-10-01', '2010-01-01')))
df.new <- generate.columns.from.date(df, 'date')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.