Skip to content

Instantly share code, notes, and snippets.

View lvalnegri's full-sized avatar
📦
working on my R packages

luca lvalnegri

📦
working on my R packages
  • London, UK
View GitHub Profile
library(magick)
library(reshape2)
library(dplyr)
library(tidygraph)
library(particles)
library(animation)
plot_fun <- function(sim) {
df <- as_tibble(sim)
plot(df$x, df$y, col = df$color, pch = '.', axes = FALSE, xlim = c(-100, 317), ylim = c(-268, 100), xlab = NA, ylab = NA)