This package is used to scale the image and intended to decouple the range of x and y coordinates by providing a frame size. For example if the maximum x and y coordinates is 1000mm, then the scaler can be used to scale any input x or y values with reference to this maximum value.
- Create new instance of
Scalerusing alistwith maximum x and y coordinate values:
scale <- list(x = 1000, y = 1000) |> Scaler::Scaler()- Define the input x and y values:
coordinates <- data.frame(x = c(100, 200, 300), y = c(100, 200, 300))- Scale the input coordinates:
scaled.coordinates <- coordinates |> scale[['Coordinates']]()At this time of writing this README, this package is not available on CRAN. However, it can be installed from GitHub or build and installed locally.
- Use devtools
devtools::install_github("https://github.com/FlippieCoetser/Scale")- Clone the repository
git clone https://github.com/FlippieCoetser/Scale.git- Generate
.tar.gzfile
devtools::build()- Install package from
.tar.gzfile
install.packages("path_to_file/tar_gz_file", repos = NULL, type = "source")