Skip to content

Commit

Permalink
add code block to registry
Browse files Browse the repository at this point in the history
  • Loading branch information
DivadNojnarg committed Feb 8, 2024
1 parent 2bbfc00 commit 4de756e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion R/code.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ new_code_plot_block <- function(data, ...) {
eval()
}),
...,
class = c("code_transform_block", "plot_block", "submit_block")
class = c("code_plot_block", "plot_block", "submit_block")
)
}

Expand Down
20 changes: 16 additions & 4 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ register_blockr_extra_blocks <- function(pkg) {
demo_summarize_block,
admiral_dpc_block,
filter_expr_block,
summarize_expr_block
summarize_expr_block,
code_transform_block,
code_plot_block
),
name = c(
"plot block",
Expand All @@ -70,7 +72,9 @@ register_blockr_extra_blocks <- function(pkg) {
"demo summarize block",
"admiral dpc block",
"filter expr block",
"summarize expr block"
"summarize expr block",
"code transform block",
"code plot block"
),
description = c(
"Monolithic ggplot block",
Expand All @@ -86,7 +90,9 @@ register_blockr_extra_blocks <- function(pkg) {
"Predefined summarize block for BMS demo",
"Admiral block",
"Filter expr block",
"Summarize expr block"
"Summarize expr block",
"Code transform block",
"Code plot block"
),
classes = list(
c("plot_block", "submit_block"),
Expand All @@ -102,7 +108,9 @@ register_blockr_extra_blocks <- function(pkg) {
c("demo_summarize_block", "transform_block", "submit_block"),
c("admiral_dpc_block", "transform_block"),
c("filter_expr_block", "transform_block"),
c("summarize_expr_block", "transform_block")
c("summarize_expr_block", "transform_block"),
c("code_transform_block", "transform_block", "submit_block"),
c("code_plot_block", "plot_block", "submit_block")
),
input = c(
"data.frame",
Expand All @@ -118,6 +126,8 @@ register_blockr_extra_blocks <- function(pkg) {
"data.frame",
"data.frame",
"data.frame",
"data.frame",
"data.frame",
"data.frame"
),
output = c(
Expand All @@ -134,6 +144,8 @@ register_blockr_extra_blocks <- function(pkg) {
"data.frame",
"data.frame",
"data.frame",
"data.frame",
"data.frame",
"data.frame"
),
package = pkg
Expand Down

0 comments on commit 4de756e

Please sign in to comment.