mirror of
https://github.com/rstudio/shiny.git
synced 2026-04-07 03:00:20 -04:00
change the deprecated @S3method to @export
This commit is contained in:
@@ -208,15 +208,15 @@ setOldClass("reactivevalues")
|
||||
#' @export
|
||||
is.reactivevalues <- function(x) inherits(x, 'reactivevalues')
|
||||
|
||||
#' @S3method $ reactivevalues
|
||||
#' @export
|
||||
`$.reactivevalues` <- function(x, name) {
|
||||
.subset2(x, 'impl')$get(name)
|
||||
}
|
||||
|
||||
#' @S3method [[ reactivevalues
|
||||
#' @export
|
||||
`[[.reactivevalues` <- `$.reactivevalues`
|
||||
|
||||
#' @S3method $<- reactivevalues
|
||||
#' @export
|
||||
`$<-.reactivevalues` <- function(x, name, value) {
|
||||
if (attr(x, 'readonly')) {
|
||||
stop("Attempted to assign value to a read-only reactivevalues object")
|
||||
@@ -228,30 +228,30 @@ is.reactivevalues <- function(x) inherits(x, 'reactivevalues')
|
||||
}
|
||||
}
|
||||
|
||||
#' @S3method [[<- reactivevalues
|
||||
#' @export
|
||||
`[[<-.reactivevalues` <- `$<-.reactivevalues`
|
||||
|
||||
#' @S3method [ reactivevalues
|
||||
#' @export
|
||||
`[.reactivevalues` <- function(values, name) {
|
||||
stop("Single-bracket indexing of reactivevalues object is not allowed.")
|
||||
}
|
||||
|
||||
#' @S3method [<- reactivevalues
|
||||
#' @export
|
||||
`[<-.reactivevalues` <- function(values, name, value) {
|
||||
stop("Single-bracket indexing of reactivevalues object is not allowed.")
|
||||
}
|
||||
|
||||
#' @S3method names reactivevalues
|
||||
#' @export
|
||||
names.reactivevalues <- function(x) {
|
||||
.subset2(x, 'impl')$names()
|
||||
}
|
||||
|
||||
#' @S3method names<- reactivevalues
|
||||
#' @export
|
||||
`names<-.reactivevalues` <- function(x, value) {
|
||||
stop("Can't assign names to reactivevalues object")
|
||||
}
|
||||
|
||||
#' @S3method as.list reactivevalues
|
||||
#' @export
|
||||
as.list.reactivevalues <- function(x, all.names=FALSE, ...) {
|
||||
shinyDeprecated("reactiveValuesToList",
|
||||
msg = paste("'as.list.reactivevalues' is deprecated. ",
|
||||
@@ -422,7 +422,7 @@ reactive <- function(x, env = parent.frame(), quoted = FALSE, label = NULL) {
|
||||
structure(o$getValue@.Data, observable = o, class = "reactive")
|
||||
}
|
||||
|
||||
#' @S3method print reactive
|
||||
#' @export
|
||||
print.reactive <- function(x, ...) {
|
||||
label <- attr(x, "observable")$.label
|
||||
cat(label, "\n")
|
||||
|
||||
12
R/shiny.R
12
R/shiny.R
@@ -599,7 +599,7 @@ ShinySession <- setRefClass(
|
||||
structure(list(impl=shinysession), class='shinyoutput')
|
||||
}
|
||||
|
||||
#' @S3method $<- shinyoutput
|
||||
#' @export
|
||||
`$<-.shinyoutput` <- function(x, name, value) {
|
||||
label <- deparse(substitute(value))
|
||||
attr(label, "srcref") <- srcrefFromShinyCall(substitute(value)[[2]])
|
||||
@@ -608,23 +608,23 @@ ShinySession <- setRefClass(
|
||||
return(invisible(x))
|
||||
}
|
||||
|
||||
#' @S3method [[<- shinyoutput
|
||||
#' @export
|
||||
`[[<-.shinyoutput` <- `$<-.shinyoutput`
|
||||
|
||||
#' @S3method $ shinyoutput
|
||||
#' @export
|
||||
`$.shinyoutput` <- function(x, name) {
|
||||
stop("Reading objects from shinyoutput object not allowed.")
|
||||
}
|
||||
|
||||
#' @S3method [[ shinyoutput
|
||||
#' @export
|
||||
`[[.shinyoutput` <- `$.shinyoutput`
|
||||
|
||||
#' @S3method [ shinyoutput
|
||||
#' @export
|
||||
`[.shinyoutput` <- function(values, name) {
|
||||
stop("Single-bracket indexing of shinyoutput object is not allowed.")
|
||||
}
|
||||
|
||||
#' @S3method [<- shinyoutput
|
||||
#' @export
|
||||
`[<-.shinyoutput` <- function(values, name, value) {
|
||||
stop("Single-bracket indexing of shinyoutput object is not allowed.")
|
||||
}
|
||||
|
||||
16
R/tags.R
16
R/tags.R
@@ -43,7 +43,7 @@ isTag <- function(x) {
|
||||
inherits(x, "shiny.tag")
|
||||
}
|
||||
|
||||
#' @S3method print shiny.tag
|
||||
#' @export
|
||||
print.shiny.tag <- function(x, ...) {
|
||||
print(as.character(x), ...)
|
||||
invisible(x)
|
||||
@@ -51,32 +51,32 @@ print.shiny.tag <- function(x, ...) {
|
||||
|
||||
# indent can be numeric to indicate an initial indent level,
|
||||
# or FALSE to suppress
|
||||
#' @S3method format shiny.tag
|
||||
#' @export
|
||||
format.shiny.tag <- function(x, ..., singletons = character(0), indent = 0) {
|
||||
as.character(renderTags(x, singletons = singletons, indent = indent)$html)
|
||||
}
|
||||
|
||||
#' @S3method as.character shiny.tag
|
||||
#' @export
|
||||
as.character.shiny.tag <- function(x, ...) {
|
||||
renderTags(x)$html
|
||||
}
|
||||
|
||||
#' @S3method print shiny.tag.list
|
||||
#' @export
|
||||
print.shiny.tag.list <- print.shiny.tag
|
||||
|
||||
#' @S3method format shiny.tag.list
|
||||
#' @export
|
||||
format.shiny.tag.list <- format.shiny.tag
|
||||
|
||||
#' @S3method as.character shiny.tag.list
|
||||
#' @export
|
||||
as.character.shiny.tag.list <- as.character.shiny.tag
|
||||
|
||||
#' @S3method print html
|
||||
#' @export
|
||||
print.html <- function(x, ...) {
|
||||
cat(x, "\n")
|
||||
invisible(x)
|
||||
}
|
||||
|
||||
#' @S3method format html
|
||||
#' @export
|
||||
format.html <- function(x, ...) {
|
||||
as.character(x)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user