Nothing
MinMaxNorm <- structure(function(
##title<<
## Normalize to a range
##description<<
## Normalizes values to a given range.
x,
### values
ext=c(0,1),
### new minimum and maximum values
...
### further arguments (unused)
##details<<
## No details.
##references<< No reference.
) {
max <- max(x, na.rm=TRUE)
min <- min(x, na.rm=TRUE)
std <- (x - min) * ((ext[2] - ext[1]) / (max - min)) + ext[1]
return(std)
### vector with normalized values
}, ex=function() {
x <- rnorm(10, 0, 2)
n <- MinMaxNorm(x)
plot(x, n)
})
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.