day.impute
is greater than the number of days for a given month, then
the last day of that month will be imputed. This will also take into account
there are 29 days in February in leap years. Setting day.impute = 31
ensures
the last day of the month will always be imputed if the day is missing.Package help file is now auto-generated.
exampledates
has been updated to now include dates in non-English formatsdatefixR
is used with a locale which does not accept
multibyte characters now only occurs when the package is loaded using
library()
.Support has been added for parsing dates converted to a numeric format by
Excel. Unlike R which converts Date
objects to numeric by calculating the
number of days since 1970-01-01
, Excel typically converts date cells to
numeric cells by calculating the number of days since 1900-01-01
. datefixR
can be told to expect dates converted by Excel instead of R by passing
excel = TRUE
to datefixR
's functions.
In datefixR
1.3.1, internal functions began to be converted to C++. This
process unintentionally led to translations of some user-facing messages not
being delivered to users. This bug has now been fixed.
Added function documentation for the new excel
argument and updated the "Getting
Started" vignette with a section on converting numeric dates.
A warning is now raised if datefixR is used with a locale which does not support multibyte characters. Tests for months names in different languages now first check if multibyte characters are supported before running.
Tests have been refactored: making it easier for others to contribute their own tests. See #57.
datefixR
in READMEAdded much wider support for date formats commonly seen in regions where English is not the first language (de and del, "1er" "le" etc.) .
Months with Portuguese names are now recognized.
"." and ".'" separators are now supported.
Support has been added for dates with ordinals ("1st", "2nd", etc.)
datefixR
will now recognize when a month-first date is given (without
needing the format
argument to be explicitly provided) if the month is
given by name e.g "July 4th, 1776"
Thanks to community submissions, error messages and warnings have now been translated to French and Spanish. These messages should automatically be delivered instead of the English language versions based on the locale detected by R.
The README file now mentions which languages datefixR
currently supports.
This update introduces a Shiny app and support for names of months in Spanish, German, and French.
fix_date_app()
which produces a shiny app for accessing
the features of datefixR
. Please note, the package dependencies for this app
(DT
, htmltools
, readxl
, and shiny
) are not installed alongside
datefixR
. This allows datefixR to be installed on secure systems where these
packages may not be allowed. If one of these dependencies is not installed on
the system when this function is called, then the user will have the option of
installing them.asciicast
to demonstrate the
package.For this revision, datefixR
has undergone
ropensci peer review
which has resulted in substantial changes and improvements to the package. My
sincerest thanks to the reviewers, Kaique dos S. Alves and Al-Ahmadgaid B.
Asaad, and the editor, Adam H. Sparks.
fix_date()
and fix_dates()
have been deprecated in favor of
fix_date_char()
and fix_date_df()
respectively to make the role of each
function clearer. The deprecated functions will continue to work but are not
guaranteed to have new features. Users will be gently encouraged to transition
to the new functions.fix_date_char()
now supports vectors as well as character objects of length 1.
This also means fix_date_char()
can be used with dplyr::mutate()
.exampledates
, is
now provided with the package.NA
imputationformat
.id
argument to fix_dates()
. If not explicitly stated, the first
column is assumed to contain row IDs.day.impute = NA
or month.impute = NA
will now result in NA if day
or month is missing respectively in a date and a warning is issued. If
day.impute = NULL
or month.impute = NULL
then the function will error if
day or month is missing respectively in a datedatefixR
vignette which describes the package in more detail than the
READMEfix_date()
for fixing individual dates.NEWS.md
file to track changes to the package.