Convert reprex output to slackblocks with text and figure links if relevant

reprex_to_blocks(x)

Arguments

x

reprex output

Value

slackblocks

Details

If a reprex chunk contains an error an rotating_light emoji will be attacheted to the textblock.

Examples

if (FALSE) { if(interactive()){ reprex_to_blocks( reprex::reprex({ x <- 10 x + 2 }, venue = 'gh', advertise = FALSE, show = FALSE) ) # with plot reprex_to_blocks( reprex::reprex({ x <- 10 hist(runif(x)) }, venue = 'gh', advertise = FALSE, show = FALSE) ) # with error reprex_to_blocks( reprex::reprex({ x <- 10 hist(runif(2*y)) }, venue = 'gh', advertise = FALSE, show = FALSE) ) }}