11# ' @export
22tm_a_regression.picks <- function (label = " Regression Analysis" ,
3- regressor = picks(
4- datasets(),
5- variables(
6- choices = tidyselect :: where( is.numeric ) ,
3+ regressor = teal.transform :: picks(
4+ teal.transform :: datasets(),
5+ teal.transform :: variables(
6+ choices = is.numeric ,
77 selected = tidyselect :: last_col(),
88 multiple = TRUE
99 ),
10- values()
10+ teal.transform :: values()
1111 ),
12- response = picks(
13- datasets(),
14- variables(choices = tidyselect :: where( is.numeric ) ),
15- values()
12+ response = teal.transform :: picks(
13+ teal.transform :: datasets(),
14+ teal.transform :: variables(choices = is.numeric ),
15+ teal.transform :: values()
1616 ),
17- outlier = picks(
17+ outlier = teal.transform :: picks(
1818 regressor $ datasets ,
19- variables(choices = where(~ is.factor(. ) || is.character(. ))),
20- values()
21- ), # default should be picks(datasets(), variables(primary_keys())
19+ teal.transform :: variables(choices = tidyselect :: where(~ is.factor(. ) || is.character(. ))),
20+ teal.transform :: values()
21+ ), # default should be teal.transform:: picks(datasets(), teal.transform:: variables(primary_keys())
2222 plot_height = c(600 , 200 , 2000 ),
2323 plot_width = NULL ,
2424 alpha = c(1 , 0 , 1 ),
@@ -40,12 +40,12 @@ tm_a_regression.picks <- function(label = "Regression Analysis",
4040
4141 checkmate :: assert_class(response , " picks" )
4242 if (isTRUE(attr(response $ variables , " multiple" ))) {
43- warning(" `response` accepts only a single variable selection. Forcing `variables(multiple) to FALSE`" )
43+ warning(" `response` accepts only a single variable selection. Forcing `teal.transform:: variables(multiple) to FALSE`" )
4444 attr(response $ variables , " multiple" ) <- FALSE
4545 }
4646 checkmate :: assert_class(outlier , " picks" , null.ok = TRUE )
4747 if (isTRUE(attr(outlier $ variables , " multiple" ))) {
48- warning(" `outlier` accepts only a single variable selection. Forcing `variables(multiple) to FALSE`" )
48+ warning(" `outlier` accepts only a single variable selection. Forcing `teal.transform:: variables(multiple) to FALSE`" )
4949 attr(outlier $ variables , " multiple" ) <- FALSE
5050 }
5151
@@ -117,10 +117,7 @@ tm_a_regression.picks <- function(label = "Regression Analysis",
117117 ui_args = args [names(args ) %in% names(formals(ui_a_regression.picks ))],
118118 server_args = args [names(args ) %in% names(formals(srv_a_regression.picks ))], ,
119119 transformators = transformators ,
120- datanames = {
121- datanames <- datanames(list (regressor , response ))
122- if (length(datanames )) datanames else " all"
123- }
120+ datanames = .picks_datanames(list (regressor , response ))
124121 )
125122 attr(ans , " teal_bookmarkable" ) <- FALSE
126123 ans
@@ -148,12 +145,12 @@ ui_a_regression.picks <- function(id,
148145 )),
149146 encoding = tags $ div(
150147 tags $ label(" Encodings" , class = " text-primary" ), tags $ br(),
151- teal :: teal_nav_item (
152- label = tags $ strong(" Response variable" ),
148+ tags $ div (
149+ tags $ strong(" Response variable" ),
153150 teal.transform :: picks_ui(id = ns(" response" ), picks = response )
154151 ),
155- teal :: teal_nav_item (
156- label = tags $ strong(" Regressor variables" ),
152+ tags $ div (
153+ tags $ strong(" Regressor variables" ),
157154 teal.transform :: picks_ui(id = ns(" regressor" ), picks = regressor )
158155 ),
159156 radioButtons(
0 commit comments