Skip to content

Commit

Permalink
get_code to return concatenated code string (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
kartikeyakirar authored Nov 29, 2023
1 parent 1dd6c0f commit b7e74c1
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 14 deletions.
7 changes: 2 additions & 5 deletions R/tm_g_gh_boxplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -532,11 +532,8 @@ srv_g_boxplot <- function(id,
card$append_text(comment)
}
card$append_src(
paste(
teal.code::get_code(
teal.code::join(create_plot(), create_table())
),
collapse = "\n"
teal.code::get_code(
teal.code::join(create_plot(), create_table())
)
)
card
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_gh_correlationplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ srv_g_correlationplot <- function(id,
card$append_text("Comment", "header3")
card$append_text(comment)
}
card$append_src(paste(teal.code::get_code(plot_q()), collapse = "\n"))
card$append_src(teal.code::get_code(plot_q()))
card
}
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
Expand Down
7 changes: 2 additions & 5 deletions R/tm_g_gh_density_distribution_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -446,11 +446,8 @@ srv_g_density_distribution_plot <- function(id, # nolint
card$append_text(comment)
}
card$append_src(
paste(
teal.code::get_code(
teal.code::join(create_plot(), create_table())
),
collapse = "\n"
teal.code::get_code(
teal.code::join(create_plot(), create_table())
)
)
card
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_gh_lineplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ srv_lineplot <- function(id,
card$append_text("Comment", "header3")
card$append_text(comment)
}
card$append_src(paste(teal.code::get_code(plot_q()), collapse = "\n"))
card$append_src(teal.code::get_code(plot_q()))
card
}
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_gh_scatterplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ srv_g_scatterplot <- function(id,
card$append_text("Comment", "header3")
card$append_text(comment)
}
card$append_src(paste(teal.code::get_code(plot_q()), collapse = "\n"))
card$append_src(teal.code::get_code(plot_q()))
card
}
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_gh_spaghettiplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ srv_g_spaghettiplot <- function(id,
card$append_text("Comment", "header3")
card$append_text(comment)
}
card$append_src(paste(teal.code::get_code(plot_q()), collapse = "\n"))
card$append_src(teal.code::get_code(plot_q()))
card
}
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
Expand Down

0 comments on commit b7e74c1

Please sign in to comment.