if(interactive()){
library(shiny)
ui <- fluidPage(
h1("Scroll the page..."),
lapply(1: 100, function(x) br()),
spsGoTop("default"),
spsGoTop("mid", right = "50%", bottom= "50%", icon = icon("house"), color = "red"),
spsGoTop("up", right = "95%", bottom= "95%", icon = icon("arrow-up"), color = "green")
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
}
Run the code above in your browser using DataLab