reprex_to_blocks: Convert reprex output to slack blocks

Description Usage Arguments Details Value Examples

View source: R/reprex_to_blocks.R

Description

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

Usage

1

Arguments

x

reprex output

Details

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

Value

slackblocks

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
## Not run: 
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)
 )
 
 }
## End(Not run)

yonicd/slackreprex documentation built on Sept. 20, 2020, 3:54 a.m.