16
16
defaultSlopeGraphMode = " item" ,
17
17
ignoreUnsupportedBrowser = FALSE
18
18
)
19
- # ' taggle - factory for Taggle HTMLWidget
19
+
20
+ # ' lineup builder pattern function
20
21
# '
21
22
# ' @param data data frame like object i.e. also crosstalk shared data frame
22
23
# ' @param options LineUp options
43
44
# ' \item{groupPadding}{padding between two groups in pixel (default: 5)}
44
45
# ' }
45
46
# '
46
- # ' @return lineup builder objects
47
+ # ' @return lineup builder object
47
48
# '
48
49
# ' @examples
49
50
# ' \dontrun{
50
- # ' taggle(mtcars)
51
- # ' taggle(iris)
51
+ # ' lineupBuilder(iris) |> buildLineUp()
52
52
# ' }
53
53
# '
54
54
# ' @export
@@ -130,16 +130,20 @@ lineupBuilder <- function(data,
130
130
}
131
131
}
132
132
133
- # ' lineup - factory for LineUp HTMLWidget
133
+ # ' factory for LineUp HTMLWidget based on a LineUpBuilder
134
134
# '
135
135
# ' @param x LineUpBuilder object
136
136
# ' @param width width of the element
137
137
# ' @param height height of the element
138
138
# ' @param elementId unique element id
139
139
# ' @param dependencies include crosstalk dependencies
140
140
# '
141
- # ' @return html lineup widget
141
+ # ' @return lineup html widget
142
142
# '
143
+ # ' @examples
144
+ # ' \dontrun{
145
+ # ' lineupBuilder(iris) |> buildLineUp()
146
+ # ' }
143
147
# ' @export
144
148
buildLineUp <- function (x , width = " 100%" ,
145
149
height = NULL ,
@@ -148,16 +152,15 @@ buildLineUp <- function(x, width = "100%",
148
152
.buildLineUpWidget(x , width , height , elementId , dependencies , lineupType = " lineup" )
149
153
}
150
154
151
- # ' taggle - factory for Taggle HTMLWidget
155
+ # ' factory for LineUp HTMLWidget based on a LineUpBuilder
156
+ # ' @inheritParams buildLineUp
152
157
# '
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
158
159
# '
159
- # ' @return html taggle widget
160
-
160
+ # ' @examples
161
+ # ' \dontrun{
162
+ # ' lineupBuilder(iris) |> buildTaggle()
163
+ # ' }
161
164
# ' @export
162
165
buildTaggle <- function (x , width = " 100%" ,
163
166
height = NULL ,
@@ -169,40 +172,18 @@ buildTaggle <- function(x, width = "100%",
169
172
170
173
# ' lineup - factory for LineUp HTMLWidget
171
174
# '
172
- # ' @param data data frame like object i.e. also crosstalk shared data frame
175
+ # ' @inheritParams lineupBuilder
173
176
# ' @param width width of the element
174
177
# ' @param height height of the element
175
178
# ' @param elementId unique element id
176
- # ' @param options LineUp options
177
- # ' @param ranking ranking definition created using \code{\link{lineupRanking}}
178
179
# ' @param dependencies include crosstalk dependencies
179
180
# ' @param ... additional ranking definitions like 'ranking1=...' due to restrictions in converting parameters
180
181
# '
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
202
184
# '
203
185
# ' @examples
204
186
# ' \dontrun{
205
- # ' lineup(mtcars)
206
187
# ' lineup(iris)
207
188
# ' }
208
189
# '
@@ -222,40 +203,14 @@ lineup <- function(data,
222
203
223
204
# ' taggle - factory for Taggle HTMLWidget
224
205
# '
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
232
207
# ' @param ... additional ranking definitions like 'ranking1=...' due to restrictions in converting parameters
208
+ # ' @inheritSection lineup LineUp options
233
209
# '
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
255
211
# '
256
212
# ' @examples
257
213
# ' \dontrun{
258
- # ' taggle(mtcars)
259
214
# ' taggle(iris)
260
215
# ' }
261
216
# '
@@ -334,14 +289,21 @@ lineupRanking <- function(columns = c("_*", "*"),
334
289
# ' @param width,height Must be a valid CSS unit (like \code{'100\%'},
335
290
# ' \code{'800px'}, \code{'auto'}) or a number, which will be coerced to a
336
291
# ' 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
+ # ' )
344
303
# '
304
+ # ' \donttest{
305
+ # ' if (interactive()) app
306
+ # ' }
345
307
# ' @export
346
308
lineupOutput <- function (outputId ,
347
309
width = " 100%" ,
@@ -351,11 +313,11 @@ lineupOutput <- function(outputId,
351
313
352
314
# ' Shiny render bindings for lineup
353
315
# '
354
- # ' @rdname lineup-shiny
355
316
# ' @param expr An expression that generates a taggle
356
317
# ' @param env The environment in which to evaluate \code{expr}.
357
318
# ' @param quoted Is \code{expr} a quoted expression (with \code{quote()})? This
358
319
# ' is useful if you want to save an expression in a variable.
320
+ # ' @rdname lineup-shiny
359
321
# ' @export
360
322
renderLineup <- function (expr ,
361
323
env = parent.frame(),
@@ -371,18 +333,22 @@ renderLineup <- function(expr,
371
333
# ' Output and render functions for using taggle within Shiny
372
334
# ' applications and interactive Rmd documents.
373
335
# '
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
+ # ' )
385
348
# '
349
+ # ' \donttest{
350
+ # ' if (interactive()) app
351
+ # ' }
386
352
# ' @export
387
353
taggleOutput <- function (outputId ,
388
354
width = " 100%" ,
@@ -392,8 +358,9 @@ taggleOutput <- function(outputId,
392
358
393
359
# ' Shiny render bindings for taggle
394
360
# '
395
- # ' @importFrom htmlwidgets shinyRenderWidget
361
+ # ' @inheritParams renderLineup
396
362
# ' @rdname taggle-shiny
363
+ # '
397
364
# ' @export
398
365
renderTaggle <- function (expr ,
399
366
env = parent.frame(),
0 commit comments