Skip to contents

Creates Shinylive url based on app code.

Usage

create_shinylive_url(code, mode = c("app", "editor"), header = TRUE)

Arguments

code

(character(1)) A string with app code.

mode

(character(1)) A string with mode. One of "app" or "editor". Default is "app".

header

(logical(1)) A logical value indicating whether to include header. Ignored if mode is "editor".

Value

(character(1)) Shinylive app url.

Examples

code <- "this is your app code as a string"
create_shinylive_url(code)
#> [1] "https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMUgCwEsBnAAkaYE8iBXAJybVSbEAJnD7MoTBqW50IAczABfALpA"
create_shinylive_url(code, header = FALSE)
#> [1] "https://shinylive.io/r/app/#h=0&code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMUgCwEsBnAAkaYE8iBXAJybVSbEAJnD7MoTBqW50IAczABfALpA"
create_shinylive_url(code, mode = "editor")
#> [1] "https://shinylive.io/r/editor/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMUgCwEsBnAAkaYE8iBXAJybVSbEAJnD7MoTBqW50IAczABfALpA"