# Recent Posts

### Valentine's Day 2019

In this short project, I hope to draw a heart through an animation of appearing dots. library("gganimate") library("ggforce") library("tidyverse") Draw a Heart Here I will place two circles centered at $(\pm 1, 1)$ with the same radius $r = \sqrt{2}$. circles <- data.frame( x0 = c(-1,1), y0 = rep(1,2), r = rep(1, 2) ) right_pt <- (sqrt(2) + 1) / sqrt(2) left_pt <- -1*right_pt f <- function(x){abs(x) - sqrt(2)} ggplot(data.frame(x = c(left_pt, right_pt)), aes(x)) + coord_fixed() + geom_circle(aes(x0 = x0, y0 = y0, r = r), data = circles, inherit.

### gganatogram and gganimate

Today I wanted to see if I could create a slideshow of pictures from the gganatogram package. I wanted to combine them with the gganimate package, but I have not figured out how to get that to work. (In particular, the gganatogram() function seems to return a different list layout than ggplot objects.) library(gganatogram) ## Loading required package: ggpolypath ## Loading required package: ggplot2 library(gganimate) library(profvis) N <- 25 # number of cell samples num_cell_parts <- nrow(cell_key\$cell) # randomly select a random number of cell parts part_picker <- sample(1:num_cell_parts, sample(1:num_cell_parts, 1)) cell_num <- rep(1, length(part_picker)) this_cell <- cell_key[['cell']][part_picker, ] cell_samples <- cbind(this_cell, cell_num) for(j in 2:N){ part_picker <- sample(1:num_cell_parts, sample(1:num_cell_parts, 1)) cell_num <- rep(j, length(part_picker)) this_cell <- cbind( cell_key[['cell']][part_picker, ], cell_num) cell_samples <- rbind(cell_samples, this_cell) # figure_list[j] <- gganatogram(data = this_cell, # outline = FALSE, fillOutline='steelblue', organism="cell", fill="colour") + # theme_void() + # coord_fixed() png(filename = paste0(j, ".

### Curse of Dimensionality

Today, I hope to present a quick glimpse at the phenomenon called the “Curse of Dimensionality”. For this demonstration, I am simply calculating how much random data stays within two standard deviations (in the Euclidean norm) as we go from one dimension to higher dimensions. Random Data Here are 10 vectors of 100 random numbers each sampled from the standard normal distribution stored as a matrix … X <- matrix(rnorm(1000), nrow = 100, ncol = 10) … and as a data frame.

# Teaching

I am a teaching instructor for the following courses at the University of California at Merced:

• Math 15: first semester data science for life science students
• Bio 18: second semester data science for life science students
• Bio 184 (TBD): Python for DNA analysis

# Contact

• dsollberger@ucmerced.edu
• Derek Sollberger
School of Natural Sciences