Say I have an object that is a multi-line string:
object <- "value &
value"
I would like for the value of the object to be printed in R without “\n” and without quotes. So instead of:
object
#> [1] "value &\nvalue"
I would get:
object
#> value &
#> value
This is similar to the behavior of cat()
but I want the object to print this way by default.
I don’t want to have to call cat()
on it. I guess I need to set a special class?
Thank you so much for your help!
Created on 2022-05-25 by the reprex package (v2.0.1)