ymd_to_datestr | R Documentation |
transform ymd data table like data.frame(y=2022,m=5,d=12) to string. NA will be filled by na.fill.
ymd_to_datestr(
ymd,
dateformat = "%Y.%M.%D",
range_sep = "-",
na.fill = "?",
mode = "full"
)
ymd |
data.frame with column y, m and d for year, month and day. |
dateformat |
output format with Y, y, M, m, D, d. See detais. |
range_sep |
separation of range if ymd is range format. |
na.fill |
filled character for missing element. |
mode |
determining data filling mode = c("full","maximum","compact","short","minimum"). see detail. |
format of each mode is like the following. maximum: always range mode e.g., 2012.03.04-2012.03.04 2023.04.05-2023.05.06 full (default): range mode is used only when beg and end is different e.g., 2012.03.04 2023.04.05-2023.05.06 compact: range mode remove duplicating information e.g., 2023.04.05-05.06 2023.04.?? minimum: (information loss can occur depending on dateformat) remove NA and duplicating info e.g., 2023.04-05 dateformat can use the following special characters. (percent)Yj(at): NOT WORKING (percent)YJ(at): NOT WORKING (percent)Y(at): YYYY年 (percent)y(at): YY年 (percent)M(at): MM月 (percent)m(at): M月 (percent)D(at): DD日 (percent)d(at): D日 (percent)Y: YYYY (percent)y: YY (percent)M: MM (percent)m: M (percent)D: DD (percent)d: D
transformed str
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.