Nothing
#
# Ensure a numeric vector has a certain length.
# Repeat input if input length is 1.
# Strip any names if present.
#
broadcast <- function(vec, n) {
assert_that(is.numeric(vec))
names(vec) <- NULL
if (length(vec) == 1)
vec <- rep(vec, n)
assert_that(length(vec) == n)
vec
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.