A repository with example files and code illustrating how to use the recolorize
package (https://github.com/hiweller/recolorize). Before running these examples, I recommend installing the development version of the package:
install.packages("devtools")
devtools::install_github("hiweller/recolorize")
Alternatively, you can install the release version of the package from CRAN (just know that this will lag behind the development version):
install.packages("recolorize")
- 01_neolamprologus:
Wild Neolamprologus cichlid images are all courtesy Ad Konings.
Polistes fuscatus social wasp images are courtesy James Tumulty, excerpted with permission from this paper.
All flowerpiercer (Diglossa spp.) birds were photographed by Anna E. Hiller.
- Two examples running single images.
- Clone the GitHub repository, either by clicking the green 'Code' button and downloading/unzipping the zip file, or by cloning the repository:
git clone https://github.com/hiweller/recolorize_examples.git
- If you are using RStudio, open on the
recolorize_examples.Rproj
file in this directory to open R in the home directory of this repository. Otherwise, open R and usesetwd()
to set the working directory to this directory (setwd([path/to/folder]/recolorize_examples)
). - Execute all scripts in each folder from this directory, not the subdirectories.
- For examples 3-5, it is recommended to execute the scripts in their alphabetic order, e.g.
01_a_alignment.R
, then01_b1_recolorize.R
,01_b2_kmeans_fits.R
, then01_c_PCA.R
to understand how the examples go from input images to final output. However, for each example, the intermediate files generated by each step are saved as RDS files in anrds_files
folder, so you can also run them out of order and they should still work.