Nothing
#' @export
SASformat <- function(x, default)
UseMethod("SASformat")
#' @export
SASformat.default <- function(x, default=NULL)
{
lab <- attr(x,"SASformat")
if(is.null(lab))
default
else
lab
}
#' @export
SASformat.data.frame <- function(x, default=NULL)
{
sapply( x, SASformat)
}
#' @export
"SASformat<-" <- function(x, value)
UseMethod("SASformat<-")
#' @export
"SASformat<-.default" <- function(x, value)
{
attr(x,'SASformat') <- value
x
}
#' @export
"SASformat<-.data.frame" <- function(x, value)
{
if( ncol(x) != length(value) )
stop("vector of formats must match number of data frame columns")
for(i in 1:ncol(x))
attr(x[[i]],'SASformat') <- value[i]
x
}
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.