Reimplement ncol3 requirement
Closed this issue · 3 comments
cynthiahqy commented
- add ncol3 check to new_xmap_df()
- add column dropping message to as_xmap()
- fix xmap_reverse() tests
- add df_check_ncol3() to validator fns
I'm not sure offering helpers for modifying crossmaps is necessary or even desirable.
- Lists of maps make more sense from a "using xmaps" perspective,
- Combining multiple crossmaps into a single table add a flexible quality to xmaps that goes against the purpose of the structure as a data-provenance object.
- Users can still manipulate and store multiple sets of weights or other xmap variants in a "parent table", from which they create multiple xmap.
- Manipulation of xmaps creates risk around invalidating the map -- i.e. modifying values in the weights column is technically possible for an xmap (since it is just a data.frame column), but not desirable since the map is not revalidated after the manipulation -- i.e.
xmap |> dplyr::mutate()
should probably return a tibble rather than an xmap.
Originally posted by @cynthiahqy in https://github.com/cynthiahqy/conformr-project/issues/67#issuecomment-1436365643
cynthiahqy commented
ncol3 created some issues with designing visualisation functions -- i.e. it makes sense to keep the long names together with the xmap?
cynthiahqy commented
Less strict solution to desire for immutability:
- Switched default
.keep_all
arg inas_xmap()
to FALSE - Remove
xmap_tbl
class,
cynthiahqy commented
Continued in #98