context("Print")
test_that("tidyneuro prints workflows", {
f <- function(x, y) {x * y + 1}
g <- function(x, y) {x + y - 1}
fg <- function(x, y) {list(f(x, y), g(x, y))}
wf <- workflow("test") %>%
inputs(A = element_matrix(),
B = element_matrix()) %>%
step(f,
inputs = c("A", "B"),
output = "C")
wf %>%
step(f, inputs = c("A", "C"), output = "D")
wf %>%
step(g, inputs = c("B", "D"), output = "E")
wf %>%
step(fg,
inputs = c("A", "B"),
output = c("F", "G"))
wf %>%
step(fg,
inputs = c("A", "F"),
output = c("AF", "GEA"))
expect_output(wf %>% print())
expect_output(summary(wf))
expect_output(wf %>% log())
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.