Skip to content

Commit 38ee62e

Browse files
committed
Merge branch 'teal_data_report' into teal_reportable
2 parents 64e9ac7 + 78d35c9 commit 38ee62e

File tree

8 files changed

+26
-3
lines changed

8 files changed

+26
-3
lines changed

R/tm_a_pca.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,5 +1158,7 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl
11581158
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
11591159
}
11601160
###
1161+
1162+
decorated_output_q
11611163
})
11621164
}

R/tm_a_regression.R

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ srv_a_regression <- function(id,
982982

983983
output_q <- reactive({
984984
teal::validate_inputs(iv_r())
985-
switch(input$plot_type,
985+
obj <- switch(input$plot_type,
986986
"Response vs Regressor" = output_plot_0(),
987987
"Residuals vs Fitted" = output_plot_1(),
988988
"Normal Q-Q" = output_plot_2(),
@@ -991,6 +991,9 @@ srv_a_regression <- function(id,
991991
"Residuals vs Leverage" = output_plot_5(),
992992
"Cook's dist vs Leverage" = output_plot_6()
993993
)
994+
995+
teal.data::report(obj) <- c(teal.data::report(obj), "# Plot", obj[["plot"]])
996+
obj
994997
})
995998

996999
decorated_output_q <- srv_decorate_teal_data(
@@ -1001,11 +1004,11 @@ srv_a_regression <- function(id,
10011004
)
10021005

10031006
fitted <- reactive({
1004-
req(output_q())
1007+
req(decorated_output_q())
10051008
decorated_output_q()[["fit"]]
10061009
})
10071010
plot_r <- reactive({
1008-
req(output_q())
1011+
req(decorated_output_q())
10091012
decorated_output_q()[["plot"]]
10101013
})
10111014

@@ -1055,5 +1058,7 @@ srv_a_regression <- function(id,
10551058
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
10561059
}
10571060
###
1061+
1062+
decorated_output_q
10581063
})
10591064
}

R/tm_g_association.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,8 @@ srv_tm_g_association <- function(id,
576576
}
577577
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
578578
}
579+
580+
decorated_output_grob_q
579581
###
580582
})
581583
}

R/tm_g_bivariate.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -774,6 +774,8 @@ srv_g_bivariate <- function(id,
774774
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
775775
}
776776
###
777+
778+
decorated_output_q_facets
777779
})
778780
}
779781

R/tm_g_distribution.R

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,5 +1417,12 @@ srv_distribution <- function(id,
14171417
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
14181418
}
14191419
###
1420+
reactive(
1421+
if (input$tabs == "Histogram") {
1422+
decorated_output_dist_q()
1423+
} else if (input$tabs == "QQplot") {
1424+
decorated_output_qq_q()
1425+
}
1426+
)
14201427
})
14211428
}

R/tm_g_response.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,5 +622,7 @@ srv_g_response <- function(id,
622622
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
623623
}
624624
###
625+
626+
decorated_output_plot_q
625627
})
626628
}

R/tm_g_scatterplot.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,5 +1095,7 @@ srv_g_scatterplot <- function(id,
10951095
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
10961096
}
10971097
###
1098+
1099+
decorated_output_plot_q
10981100
})
10991101
}

R/tm_g_scatterplotmatrix.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,7 @@ srv_g_scatterplotmatrix <- function(id,
529529
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
530530
}
531531
###
532+
decorated_output_q
532533
})
533534
}
534535

0 commit comments

Comments
 (0)