rlang
rlang copied to clipboard
Error in `date_validate()`: [dplyr library - This is an internal error in the rlang package, please report it to the package authors.]
I came across this error when using dplyr library "distinct(across(everything()))", but the error message pointed to rlang. Please find a reprex below.
Distinct function was working on the existing code for a while, for last couple of days getting the same error
listHC$FACTS <- listHC$FACTS %>% distinct(across(everything())) Error in
date_validate()
: ! CorruptDate
with unknown type character. i In file type-date-time.c at line 345. i This is an internal error in the rlang package, please report it to the package authors. Backtrace: x
- -listHC$FACTS %>% distinct(across(everything()))
- -
/magrittr.dll
::000000006130185f
() -
+-dplyr::distinct(., across(everything()))
-
+-dplyr:::distinct.data.frame(., across(everything()))
-
| \-dplyr::distinct_prepare(...)
-
| \-dplyr:::add_computed_columns(...)
-
| +-dplyr::dplyr_col_modify(.data, cols)
-
| \-dplyr:::dplyr_col_modify.data.frame(.data, cols)
-
| \-vctrs::vec_recycle_common(!!!cols, .size = nrow(data))
-
| \-`/vctrs.dll`::`000000006816fbef`()
-
| \-`/vctrs.dll`::`000000006816f89f`()
-
| \-`/vctrs.dll`::`000000006817026f`()
-
| \-`/vctrs.dll`::`000000006816fdbf`()
-
| \-`/vctrs.dll`::`000000006817ee0f`()
-
| \-`/vctrs.dll`::`00000000681855ff`()
-
| \-`/vctrs.dll`::`00000000681855af`()
-
| \-`/vctrs.dll`::`0000000068184f6f`()
-
| \-vctrs `<fn>`()
-
| \-vctrs::vec_proxy(x = x)
-
| \-vctrs:::date_validate(x)
-
| \-`/vctrs.dll`::`000000006817d8af`()
-
| \-`/rlang.dll`::`00000000007a2ddf`()
-
| \-`/rlang.dll`::`00000000007a2cff`()
-
| \-`/rlang.dll`::`00000000007ba7af`()
-
\-rlang:::stop_internal_c_lib(...)
-
\-rlang::abort(message, call = call, .internal = TRUE)
I'm seeing
! Corrupt Date with unknown type character.
It is likely that you have some kind of corrupt column in your data frame.
Can you please post a full reprex? http://tidyverse.org/help/
I can only reproduce this with significant effort, so I think it is an error with your data generating process somehow, and not an error with rlang, vctrs, or dplyr.
df <- data.frame(x = .Date("a"))
dplyr::distinct(df, x)
#> Error in `date_validate()`:
#> ! Corrupt `Date` with unknown type character.
#> ℹ In file 'type-date-time.c' at line 345.
#> ℹ This is an internal error in the vctrs package, please report it to the package authors.
Created on 2022-08-16 by the reprex package (v2.0.1)