collateral icon indicating copy to clipboard operation
collateral copied to clipboard

Helpers for extracting side effects

Open jimjam-slam opened this issue 7 years ago • 2 comments

Extracting the results from a collateral list-column isn't too hard: map(my_safe_column, 'result').

Other side effects are a little trickier, though: the messages from errors are wrapped inside an object along with other text, and there can be several warnings, messages or other outputs for each element. Should collateral provide helpers to quickly provide companion columns with collapsed versions of these?

jimjam-slam avatar Nov 21 '18 00:11 jimjam-slam

that would be great, and indeed, issue is that warnings might multiple, so that would create a n issue. But maybe still having a function that helps mutate() the 2/4 slots of safely/quietly as columns, or return the output of safely/quietly as data_frame would be already a goof first step? In general, I found that handling the output of safely/quietly to be quite cumbersome!

MatthieuStigler avatar Nov 21 '18 02:11 MatthieuStigler

I think they're definitely worth including in a prescriptive way! Whatever we settle on, the functions won't actually be super complicated, and people can always write their own alternatives if they'd prefer.

jimjam-slam avatar Nov 21 '18 05:11 jimjam-slam