For harmonized variables in the Israel 2008 micro-sample, I use the read_ipums_micro() function in R along with the DDI .xml file (this is my extract #146). In my code, ListFiles[1] is the full path and file name of the .dat file, and ListFiles[3] is the full path and file name for the .xml file.
I get the following error:
rlang::last_error()
<error/vctrs_error_cast_lossy>
Can’t convert from labels
to x
due to loss of precision.
- Locations: 24, 39, 45, 53, 57, 59, 63, 64, 67, 69
Backtrace:- ipumsr::read_ipums_micro(ddi = ListFiles[3], data_file = ListFiles[1])
- ipumsr::set_ipums_var_attributes(out, ddi, var_attrs)
- purrr::walk(…)
- purrr::map(.x, .f, …)
- ipumsr:::.f(.x[[i]], …)
- ipumsr:::set_single_var_attributes(…)
- haven::labelled(x, val_labels)
- haven:::vec_cast_named(labels, x, x_arg = “labels”, to_arg = “x”)
- vctrs::vec_cast(x, to, …)
- vctrs:::vec_cast.integer.double(…)
- vctrs::maybe_lossy_cast(out, x, to, lossy, x_arg = x_arg, to_arg = to_arg)
- vctrs:::stop_lossy_cast(…)
- vctrs:::stop_vctrs(…)