Drawing Gemstones With ggplot

Composition of irregular and complex patterns can be simplified with ggplot; graphical package used in R. This project aims to recreate various crystallic shapes via random sampling from uniform and standard normal distribution. Additional to the ggplot2 package there are two more dependencies; cowplot and RColorBrewer. cowplot is required for importing the theme_nothing() function(minimal theme without any legends or axis) and the plot_grid() function which enables plotting multiple ggplot objects in a single page....

August 28, 2021 · 1 min · Me

R Tips and Tricks

Intro Over the past few years studying statistics, I’ve learned a few tips and tricks with R and RStudio. Import multiple libraries at once Since R has some object-oriented goodness, importing multiple libraries all at once is possible in the following way. 1 2 pkgs <- c("ggplot2", "dplyr", "sp", "sf", "reticulate", ...) lapply(library, pkgs, character.only = TRUE) Also note that importing tidyverse package can come in handy....

April 16, 2021 · 3 min · Me