Open tapendersingh opened 1 month ago
Hmm, never encountered this. Can you attach your empty SAS dataset so I can test? I don't have SAS.
Hi, I also have this issue.
I was able to recreate the issue by doing 2 things:
SAS Code to make dataset:
data work.empty;
id = '';
tmpdt = .;
format tmpdt datetime16.;
delete;
run;
R console:
Error in datetime_validate()
:
! Corrupt
POSIXctwith unknown type logical.
i In file type-date-time.c at line 387.
i This is an internal error that was detected in the vctrs package.
Please report it at <https://github.com/r-lib/vctrs/issues> with a reprex and the full backtrace.
Backtrace:
x
1. +-libr::libname(test, "U:/", "sas7bdat")
2. | \-libr:::exec_spec(dat, spcs, nm)
4. | +-base::
[[<-(
tmp, nm, value =
)
5. | \-tibble:::
[[<-.tbl_df(
tmp, nm, value =
)
6. | \-tibble:::tbl_subassign(...)
7. | \-tibble:::vectbl_recycle_rhs_rows(...)
8. | +-base::withCallingHandlers(...)
9. | \-vctrs::vec_recycle(value[[j]], nrow)
10. | \-vctrs (local)
()
11. | \-vctrs::vec_proxy(x = x)
12. | \-vctrs:::datetime_validate(x)
13. \-rlang:::stop_internal_c_lib(...)
14. \-rlang::abort(message, call = call, .internal = TRUE, .frame = frame)
Thanks for the sample dataset. Let me investigate.
Dear developers, I used libname function to read the SAS7BDAT datasets, but somehow it fails due to empty sas datasets and gives following error statement - Error in
date_validate()
: ! CorruptDate
with unknown type logical. i In file type-date-time.c at line 344. i Install the winch package to get additional debugging info the next time you get this error. i This is an internal error that was detected in the vctrs package. Please report it at https://github.com/r-lib/vctrs/issues with a reprex (https://tidyverse.org/help/) and the full backtrace. Backtrace: x[[<-
(*tmp*
, nm, value =<date>
)[[<-.tbl_df
(*tmp*
, nm, value =<date>
)<fn>
()Currently I am using R version 4.3.1 in my organization.
TIA