show-routine: Step title

Description Usage Arguments Details Value See Also Examples

Description

Show a title given to the step.

Add a line or table of used filters in a given step. Since a step should probably come from a YAML file, then it'll iteratively look for filtering, filters, filter, in that order. Lastly, it looks for subset.

Show parameters used for a step.

Show tables with DT::datatable or knitr::kable.

Add description from a step element.

Connect google document.

Show step's issues.

Show step's command(s).

Create step's section.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
report_title(x, conf, hlevel = "###")

report_filters(x)

report_parameters(x)

report_tables(x, interactive = "choose", table_summarise = FALSE)

report_description(x, conf = NULL, hide = FALSE)

report_gsheet(x)

report_issues(x, name = "", hlevel = "###")

report_command(x, type = "bash")

report_section(
  object,
  name = 1,
  hide = FALSE,
  lock = FALSE,
  hlevel = "###",
  close_tabset = FALSE
)

Arguments

x

Step's config.

conf

Step's arguments, Default: NULL.

hlevel

Header level, Default: '###'.

interactive

Use DT?, Default: 'choose' (if No. of rows > 15).

table_summarise

Make a summary of the table, Default: FALSE.

hide

Collapsible description, Default: FALSE.

name

Step's name, Default: 1.

type

Type of chunk (r, bash, python).

object

Reportr object.

lock

Is it a step with "locked" parameters, Default: FALSE.

close_tabset

In case you need something to show right after the last tab, Default: FALSE.

Details

It accepts a single filtering criteria or multiple (melted).

It accepts a list, looks for "lock" or "parameters" and takes the first one it finds.

Creates a temporary Rmd file and calls it with knit_child.

Value

Prints the title using cat.

None (invisible 'NULL'). If one filter it will show a line, if not it will use 'knitr::kable' after reshape2::melt.

Prints a kable.

Creates a table.

Prints the description.

Prints an iframe object.

Prints the issues (if found).

Prints the command into a selected chunk type.

Prints all the elements of a step.

See Also

melt kable

kable

fread, rbindlist datatable kable

knit_child

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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
## Not run: 
 if(interactive()) {
  report_title(x = "Step N", conf = list("~/Documents/liai/literature"))
 }

## End(Not run)
## Not run: 
  if(interactive()){
    report_filters(x = list(filtering = "n_umi >= 1000"))
  }

## End(Not run)
## Not run: 
  if(interactive()) report_parameters(list(parameters = NULL))

## End(Not run)
## Not run: 
 if(interactive()) {
  report_tables(x = "~/Documents/liai/asthma/biopsy/metadata_library.csv")
 }

## End(Not run)
## Not run: 
 if(interactive()){
  report_description("Description")
  report_description(list(description = "Brief description"))
  report_description("Description", hide = TRUE)
 }

## End(Not run)
## Not run: 
 if(interactive()) {
  report_gsheet("spreadsheets/d/1v3ff8KKWGK5iCAyMa0v45wiw5El4Lcy0HVjTAbuYguU")
 }

## End(Not run)
## Not run: 
 if(interactive()) {
  report_issues(list(issues = "Red is not a colour"))
  report_issues(list(issues = "Solved: red _is_ a colour"))
  report_issues(list(issues = "Fatal: red _is_ blue!"))
 }

## End(Not run)
## Not run: 
 if(interactive()) report_command(list(command = "sh /path/to/script.sh"))

## End(Not run)
## Not run: 
 if(interactive()) {
  mysteps = list(s1 = list("~/Documents/liai/literature", issues = "Oh no!"))
  mysteps$s1$hfiles = c(`Cool review` = "immunology.pdf")
  ws = create_wsteps(mysteps)
  report_section(ws)
 }

## End(Not run)

cramirezs/wreportr documentation built on Dec. 19, 2021, 6:09 p.m.