Description Usage Arguments Value Examples
View source: R/two_range_translation.R
Returns a function to translate a point A on a scale with range (o_min, o_max) to a point B in a range (n_min, n_max)
1  | range_translation(old_max, old_min = 0, new_max = 1, new_min = -1)
 | 
old_max | 
 Double to indicate the maximum value in pixels of an image's selected axis  | 
old_min | 
 Integer to indicate starting position (0) in pixels of an images selected axis  | 
new_max | 
 Double to indicate the maximum position of the translated image's selected axis  | 
new_min | 
 Double to indicate the minimum position of the translated image's selcted axis  | 
Function translation(old_position) can be called to give the new position
1 2 3 4 5 6 7  | i_translation <- range_translation(5000)
x_translation <- range_translation(4000, 0, 2, -2)
y_translation <- range_translation(3000, 0, 3/2, -3/2)
fixed_coordinate_i <- i_translation(2500)
fixed_coordinate_x <- x_translation(2000)
fixed_coordinate_y<- -y_translation(1500)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.