Get WebR URLs from objects
repl_urls.Rd
Generic function to extract WebR URLs from different object types. Provides a clear way to get just the URLs for sharing or further processing.
Usage
repl_urls(x, ...)
# S3 method for class 'webr_link'
repl_urls(x, ...)
# S3 method for class 'webr_project'
repl_urls(x, ...)
# S3 method for class 'webr_exercise'
repl_urls(x, ...)
# S3 method for class 'webr_directory'
repl_urls(x, ...)
# S3 method for class 'webr_decoded'
repl_urls(x, ...)
# S3 method for class 'webr_decoded_batch'
repl_urls(x, ...)
# S3 method for class 'webr_preview'
repl_urls(x, ...)
# S3 method for class 'shinylive_link'
repl_urls(x, ...)
# S3 method for class 'shinylive_project'
repl_urls(x, ...)
# S3 method for class 'shinylive_directory'
repl_urls(x, ...)
# S3 method for class 'shinylive_decoded'
repl_urls(x, ...)
# S3 method for class 'shinylive_decoded_batch'
repl_urls(x, ...)
# Default S3 method
repl_urls(x, ...)
Examples
if (FALSE) { # \dontrun{
# Single link
link <- webr_repl_link("plot(1:10)")
repl_urls(link)
# Exercise (returns named vector)
exercise <- webr_repl_exercise("# TODO", "plot(1:10)", "test")
repl_urls(exercise)
# Directory (returns named vector)
links <- webr_repl_directory("./examples/")
repl_urls(links)
# Decoded files (returns original URL)
decoded <- decode_webr_link("https://webr.r-wasm.org/latest/#code=...")
repl_urls(decoded)
} # }