Scale Package
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.
Example:
- Create new instance of
Scaler
using alist
with 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']]()
Installation
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.
Install from GitHub
- Use devtools
devtools::install_github("https://github.com/FlippieCoetser/Scale")
Build and install locally
- Clone the repository
git clone https://github.com/FlippieCoetser/Scale.git
- Generate
.tar.gz
file
devtools::build()
- Install package from
.tar.gz
file
install.packages("path_to_file/tar_gz_file", repos = NULL, type = "source")