This is related to data.table objects not printed after returned from function but is not a dupe. This question is to specifically look for a way to not suppress output when using an assignment :=
data.table line at the repl. So in cases where an eval would cause R to call the print method.
I've upgraded and noticed that :=
returns invisibly now. As I develop with an interactive workflow this disrupts the flow when I am building a pipeline, add an assignment :=
line, and then expect to see the results to use as context for adding an additional step.
Sure I can add []
to the assignment lines, but this would be after realizing that my assignment line didn't print (because I didn't do this prior), and so my flow was just disrupted prior to adding this. Or, one might argue that I should always tack on []
with every assignment line so that my flow isn't disrupted, but then I have to remember to do that for only assignment lines, and since a pipeline commonly mixes assignment with filter, in practice this introduces extra cognitive overhead that - to an end user - feels unnecessary and looks inconsistent when going line by line in the pipeline.
I would rather not argue about choosing to return invisibly or not, as I figure this has been thoroughly discussed already, and the correct decision for the majority of people and use cases has been made. Instead, is there an option I can set or workaround to have :=
not return invisibly?