Skip to content

Conversation

@m7pr
Copy link
Contributor

@m7pr m7pr commented Nov 19, 2024

Part of #863

Working Example
devtools::load_all("../teal")
devtools::load_all(".")
plot_title <- teal_transform_module(
  server = make_teal_transform_server(expression({
    plot <- plot + ggtitle("Custom title")
  }))
)

# general data example
data <- teal_data()
data <- within(data, {
  require(nestcolor)
  USArrests <- USArrests
})

app <- init(
  data = data,
  modules = modules(
    tm_a_pca(
      "PCA",
      dat = data_extract_spec(
        dataname = "USArrests",
        select = select_spec(
          choices = variable_choices(
            data = data[["USArrests"]], c("Murder", "Assault", "UrbanPop", "Rape")
          ),
          selected = c("Murder", "Assault"),
          multiple = TRUE
        ),
        filter = NULL
      ),
      decorators = list(plot_title)
    )
  )
)
if (interactive()) {
  shinyApp(app$ui, app$server)
}

@m7pr m7pr added the core label Nov 19, 2024
@gogonzo gogonzo mentioned this pull request Nov 19, 2024
15 tasks
@m7pr m7pr changed the base branch from main to 1187_decorate_output@main November 19, 2024 09:44
@m7pr m7pr requested a review from averissimo November 20, 2024 10:56
@m7pr m7pr marked this pull request as ready for review November 20, 2024 10:56
@m7pr m7pr requested a review from averissimo November 21, 2024 14:33
Copy link
Contributor

@averissimo averissimo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Problem solved, 1 suggestion

@m7pr m7pr merged commit 0fcddf0 into 1187_decorate_output@main Nov 22, 2024
1 check passed
@m7pr m7pr deleted the tm_pca@1187_decorate_output@main branch November 22, 2024 10:20
@github-actions github-actions bot locked and limited conversation to collaborators Nov 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants