1616 defaultSlopeGraphMode = " item" ,
1717 ignoreUnsupportedBrowser = FALSE
1818)
19- # ' taggle - factory for Taggle HTMLWidget
19+
20+ # ' lineup builder pattern function
2021# '
2122# ' @param data data frame like object i.e. also crosstalk shared data frame
2223# ' @param options LineUp options
4344# ' \item{groupPadding}{padding between two groups in pixel (default: 5)}
4445# ' }
4546# '
46- # ' @return lineup builder objects
47+ # ' @return lineup builder object
4748# '
4849# ' @examples
4950# ' \dontrun{
50- # ' taggle(mtcars)
51- # ' taggle(iris)
51+ # ' lineupBuilder(iris) |> buildLineUp()
5252# ' }
5353# '
5454# ' @export
@@ -130,16 +130,20 @@ lineupBuilder <- function(data,
130130 }
131131}
132132
133- # ' lineup - factory for LineUp HTMLWidget
133+ # ' factory for LineUp HTMLWidget based on a LineUpBuilder
134134# '
135135# ' @param x LineUpBuilder object
136136# ' @param width width of the element
137137# ' @param height height of the element
138138# ' @param elementId unique element id
139139# ' @param dependencies include crosstalk dependencies
140140# '
141- # ' @return html lineup widget
141+ # ' @return lineup html widget
142142# '
143+ # ' @examples
144+ # ' \dontrun{
145+ # ' lineupBuilder(iris) |> buildLineUp()
146+ # ' }
143147# ' @export
144148buildLineUp <- function (x , width = " 100%" ,
145149 height = NULL ,
@@ -148,16 +152,15 @@ buildLineUp <- function(x, width = "100%",
148152 .buildLineUpWidget(x , width , height , elementId , dependencies , lineupType = " lineup" )
149153}
150154
151- # ' taggle - factory for Taggle HTMLWidget
155+ # ' factory for LineUp HTMLWidget based on a LineUpBuilder
156+ # ' @inheritParams buildLineUp
152157# '
153- # ' @param x LineUpBuilder object
154- # ' @param width width of the element
155- # ' @param height height of the element
156- # ' @param elementId unique element id
157- # ' @param dependencies include crosstalk dependencies
158+ # ' @return taggle html widget
158159# '
159- # ' @return html taggle widget
160-
160+ # ' @examples
161+ # ' \dontrun{
162+ # ' lineupBuilder(iris) |> buildTaggle()
163+ # ' }
161164# ' @export
162165buildTaggle <- function (x , width = " 100%" ,
163166 height = NULL ,
@@ -169,40 +172,18 @@ buildTaggle <- function(x, width = "100%",
169172
170173# ' lineup - factory for LineUp HTMLWidget
171174# '
172- # ' @param data data frame like object i.e. also crosstalk shared data frame
175+ # ' @inheritParams lineupBuilder
173176# ' @param width width of the element
174177# ' @param height height of the element
175178# ' @param elementId unique element id
176- # ' @param options LineUp options
177- # ' @param ranking ranking definition created using \code{\link{lineupRanking}}
178179# ' @param dependencies include crosstalk dependencies
179180# ' @param ... additional ranking definitions like 'ranking1=...' due to restrictions in converting parameters
180181# '
181- # ' @section LineUp options:
182- # ' \describe{
183- # ' \item{filterGlobally}{whether filter within one ranking applies to all rankings (default: TRUE)}
184- # ' \item{singleSelection}{restrict to single item selection (default: FALSE}
185- # ' \item{noCriteriaLimits}{allow more than one sort and grouping criteria (default: FALSE)}
186- # ' \item{animated}{use animated transitions (default: TRUE)}
187- # ' \item{sidePanel}{show side panel (TRUE, FALSE, 'collapsed') (default: 'collapsed')}
188- # ' \item{hierarchyIndicator}{show sorting and grouping hierarchy indicator (TRUE, FALSE) (default: TRUE)}
189- # ' \item{labelRotation}{how many degrees should a label be rotated in case of narrow columns (default: 0)}
190- # ' \item{summaryHeader}{show summary histograms in the header (default: TRUE)}
191- # ' \item{overviewMode}{show overview mode in Taggle by default (default: FALSE)}
192- # ' \item{expandLineOnHover}{expand to full row height on mouse over (default: FALSE)}
193- # ' \item{defaultSlopeGraphMode}{default slope graph mode: item,band (default: 'item')}
194- # ' \item{ignoreUnsupportedBrowser}{ignore unsupported browser detection at own risk (default: FALSE)}
195- # ' \item{rowHeight}{height of a row in pixel (default: 18)}
196- # ' \item{rowPadding}{padding between two rows in pixel (default: 2)}
197- # ' \item{groupHeight}{height of an aggregated group in pixel (default: 40)}
198- # ' \item{groupPadding}{padding between two groups in pixel (default: 5)}
199- # ' }
200- # '
201- # ' @return html lineup widget
182+ # ' @inheritSection lineupBuilder LineUp options
183+ # ' @return lineup html widget
202184# '
203185# ' @examples
204186# ' \dontrun{
205- # ' lineup(mtcars)
206187# ' lineup(iris)
207188# ' }
208189# '
@@ -222,40 +203,14 @@ lineup <- function(data,
222203
223204# ' taggle - factory for Taggle HTMLWidget
224205# '
225- # ' @param data data frame like object i.e. also crosstalk shared data frame
226- # ' @param width width of the element
227- # ' @param height height of the element
228- # ' @param elementId unique element id
229- # ' @param options LineUp options
230- # ' @param ranking ranking definition created using \code{\link{lineupRanking}}
231- # ' @param dependencies include crosstalk dependencies
206+ # ' @inheritParams lineup
232207# ' @param ... additional ranking definitions like 'ranking1=...' due to restrictions in converting parameters
208+ # ' @inheritSection lineup LineUp options
233209# '
234- # ' @section LineUp options:
235- # ' \describe{
236- # ' \item{filterGlobally}{whether filter within one ranking applies to all rankings (default: TRUE)}
237- # ' \item{singleSelection}{restrict to single item selection (default: FALSE}
238- # ' \item{noCriteriaLimits}{allow more than one sort and grouping criteria (default: FALSE)}
239- # ' \item{animated}{use animated transitions (default: TRUE)}
240- # ' \item{sidePanel}{show side panel (TRUE, FALSE, 'collapsed') (default: 'collapsed')}
241- # ' \item{hierarchyIndicator}{show sorting and grouping hierarchy indicator (TRUE, FALSE) (default: TRUE)}
242- # ' \item{labelRotation}{how many degrees should a label be rotated in case of narrow columns (default: 0)}
243- # ' \item{summaryHeader}{show summary histograms in the header (default: TRUE)}
244- # ' \item{overviewMode}{show overview mode in Taggle by default (default: FALSE)}
245- # ' \item{expandLineOnHover}{expand to full row height on mouse over (default: FALSE)}
246- # ' \item{defaultSlopeGraphMode}{default slope graph mode: item,band (default: 'item')}
247- # ' \item{ignoreUnsupportedBrowser}{ignore unsupported browser detection at own risk (default: FALSE)}
248- # ' \item{rowHeight}{height of a row in pixel (default: 18)}
249- # ' \item{rowPadding}{padding between two rows in pixel (default: 2)}
250- # ' \item{groupHeight}{height of an aggregated group in pixel (default: 40)}
251- # ' \item{groupPadding}{padding between two groups in pixel (default: 5)}
252- # ' }
253- # '
254- # ' @return html taggle widget
210+ # ' @return taggle html widget
255211# '
256212# ' @examples
257213# ' \dontrun{
258- # ' taggle(mtcars)
259214# ' taggle(iris)
260215# ' }
261216# '
@@ -334,14 +289,21 @@ lineupRanking <- function(columns = c("_*", "*"),
334289# ' @param width,height Must be a valid CSS unit (like \code{'100\%'},
335290# ' \code{'800px'}, \code{'auto'}) or a number, which will be coerced to a
336291# ' string and have \code{'px'} appended.
337- # ' @param expr An expression that generates a lineup
338- # ' @param env The environment in which to evaluate \code{expr}.
339- # ' @param quoted Is \code{expr} a quoted expression (with \code{quote()})? This
340- # ' is useful if you want to save an expression in a variable.
341- # '
342- # ' @name lineup-shiny#'
343- # ' @importFrom htmlwidgets shinyWidgetOutput
292+ # ' @rdname lineup-shiny
293+ # ' @return An output or render function that enables the use of the widget within Shiny applications.
294+ # ' @examples # !formatR
295+ # ' library(shiny)
296+ # ' app <- shinyApp(
297+ # ' ui = fluidPage(lineupOutput("lineup")),
298+ # ' server = function(input, output) {
299+ # ' lineup <- lineupBuilder(iris) |> buildLineUp()
300+ # ' output$lineup <- renderLineup(lineup)
301+ # ' }
302+ # ' )
344303# '
304+ # ' \donttest{
305+ # ' if (interactive()) app
306+ # ' }
345307# ' @export
346308lineupOutput <- function (outputId ,
347309 width = " 100%" ,
@@ -351,11 +313,11 @@ lineupOutput <- function(outputId,
351313
352314# ' Shiny render bindings for lineup
353315# '
354- # ' @rdname lineup-shiny
355316# ' @param expr An expression that generates a taggle
356317# ' @param env The environment in which to evaluate \code{expr}.
357318# ' @param quoted Is \code{expr} a quoted expression (with \code{quote()})? This
358319# ' is useful if you want to save an expression in a variable.
320+ # ' @rdname lineup-shiny
359321# ' @export
360322renderLineup <- function (expr ,
361323 env = parent.frame(),
@@ -371,18 +333,22 @@ renderLineup <- function(expr,
371333# ' Output and render functions for using taggle within Shiny
372334# ' applications and interactive Rmd documents.
373335# '
374- # ' @param outputId output variable to read from
375- # ' @param width,height Must be a valid CSS unit (like \code{'100\%'},
376- # ' \code{'800px'}, \code{'auto'}) or a number, which will be coerced to a
377- # ' string and have \code{'px'} appended.
378- # ' @param expr An expression that generates a taggle
379- # ' @param env The environment in which to evaluate \code{expr}.
380- # ' @param quoted Is \code{expr} a quoted expression (with \code{quote()})? This
381- # ' is useful if you want to save an expression in a variable.
382- # '
383- # ' @name taggle-shiny
384- # ' @importFrom htmlwidgets shinyWidgetOutput
336+ # ' @inheritParams lineupOutput
337+ # ' @rdname taggle-shiny
338+ # ' @return An output or render function that enables the use of the widget within Shiny applications.
339+ # ' @examples # !formatR
340+ # ' library(shiny)
341+ # ' app <- shinyApp(
342+ # ' ui = fluidPage(taggleOutput("taggle")),
343+ # ' server = function(input, output) {
344+ # ' taggle <- lineupBuilder(iris) |> buildTaggle()
345+ # ' output$taggle <- renderTaggle(taggle)
346+ # ' }
347+ # ' )
385348# '
349+ # ' \donttest{
350+ # ' if (interactive()) app
351+ # ' }
386352# ' @export
387353taggleOutput <- function (outputId ,
388354 width = " 100%" ,
@@ -392,8 +358,9 @@ taggleOutput <- function(outputId,
392358
393359# ' Shiny render bindings for taggle
394360# '
395- # ' @importFrom htmlwidgets shinyRenderWidget
361+ # ' @inheritParams renderLineup
396362# ' @rdname taggle-shiny
363+ # '
397364# ' @export
398365renderTaggle <- function (expr ,
399366 env = parent.frame(),
0 commit comments