View source: R/range_function.R
range_function | R Documentation |
Range function. To be called by harmonization function.
range_function(
data = temp_dataset,
min_max_range = possible_range,
new_var = item
)
data |
Data to be modified |
min_max_range |
Range of allowed values |
new_var |
New variable |
Returns a list with the new vector (values outside of range set to NA), and the number of values set to NA.
test_data <- data.frame(val = 1:10)
range_function(data = test_data, min_max_range = '[2,8]', new_var = 'val')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.