Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1 blockr update #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

1 blockr update #1

wants to merge 2 commits into from

Conversation

DivadNojnarg
Copy link

Update to block 0.0.2

A question:

@JohnCoene Why is there a specific evaluate method?

#' @method evaluate_block clinical_timeline_block
#' @export
evaluate_block.clinical_timeline_block <- function(x, data, ...) {
  stopifnot(...length() == 0L)
  eval(
    substitute(data %>% expr, list(expr = blockr::generate_code(x))),
    list(data = data)
  )
}

This inherits from the block class so it would be handled by the current {blockr} method which is the same code as the above.

plop <- new_clinical_timeline_block()
attr(,"class")
[1] "clinical_timeline_block" "plot_block"              "block"     

@DivadNojnarg DivadNojnarg requested a review from JohnCoene July 3, 2024 13:49
@JohnCoene
Copy link
Member

I remember trying without and it would not work, at least on previous versions. Does it work without? If so we can remove.

@DivadNojnarg
Copy link
Author

During my test, it worked without. Can you double check with the latest blockr main?

@DivadNojnarg
Copy link
Author

When we are done reworking the blockr block server logic we can also get rid of blockr:::generate_server_block(...). But not yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants