Description Usage Arguments Value Author(s) Examples
View source: R/convert_dates.R
This function convert a partial date of the form Unknown.mm.YYYY or
Unknown.Unknown.YYYY to the typical placeholders 15.mm.YYYY and 01.07.YYYY,
respectively. Other partial.date.string
can be specified.
Alternatively, the 'exact' midpoint of the month/year can be used, i.e.
floor(ndays/2)
and 02.07.YYYY.
1 2 3 | ## S3 method for class 'partial.date'
fill(date.string, partial.date.string = "Unknown",
.format = "%Y-%m-%d", exact = FALSE)
|
date.string |
string containing a partial date |
partial.date.string |
string used for unknown data components (e.g. 'Unknown' or '–') |
.format |
format of the dates (default: '%Y-%m-%d') |
exact |
use the exact modpoints |
Date string, converted if applicable.
Pascal Benkert
1 2 | fill.partial.date("Unknown.02.2014", "Unknown", .format="%d.%m.%Y", exact=TRUE) # 14.02.2014
fill.partial.date("2014/--/--", "--", .format="%Y/%m/%d") # 2014/07/01
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.