s3source | R Documentation |
Source R code (a la source
) from S3
s3source(object, bucket, ..., opts = NULL)
object |
Character string with the object key, or an object of class “s3_object”. In most cases, if |
bucket |
Character string with the name of the bucket, or an object of class “s3_bucket”. |
... |
Additional arguments passed to |
opts |
Additional arguments passed to |
See source
s3saveRDS
,s3save
, get_object
## Not run:
# create bucket
b <- put_bucket("myexamplebucket")
# save some code to the bucket
cat("x <- 'hello world!'\nx", file = "example.R")
put_object("example.R", object = "example.R", bucket = b)
get_bucket(b)
# source the code from the bucket
s3source(object = "example.R", bucket = b, echo = TRUE)
# cleanup
unlink("example.R")
delete_object(object = "example.R", bucket = b)
delete_bucket("myexamplebucket")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.