View source: R/add_null_dims.R
add_null_dims | R Documentation |
add_null_dims: Add null dimensions to another function. Allows you to pass in input data with any number of dimensions and it will only keep the first nactive.
add_null_dims(func, nactive)
func |
Function to add null dimensions to |
nactive |
Number of active dimensions in func |
Function that can take any dimensional input
banana(c(.1,.2))
# banana(c(.1,.2,.4,.5,.6,.7,.8)) # gives warning
add_null_dims(banana, nact=2)(c(.1,.2,.4,.5,.6,.7,.8))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.