## get factor levels as a factor of the same levels
flevels <- function(v) { factor(levels(v), levels=levels(v)) }
if (FALSE)
{
# usage examples
flevels(weather$outlook)
flevels(weather$outlook)[as.integer(weather$outlook)]==weather$outlook
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.