#remotes::install_cran(c("anglr", "silicate"))
library(silicate)
library(anglr)
library(rgl)
## volcano is heightmap, doesn't exist in geo-space in R so we map it do the extent of
## these spatial polygons
poly <- silicate::minimal_mesh
# xmin : 0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# remotes::install_github("coolbutuseless/eventloop") | |
Pong <- R6::R6Class( | |
"pong", | |
public = list( | |
initialize = function(width=10, height=7, speed=0.02) { | |
require(grid) | |
private$width <- width | |
private$height <- height |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
listframe <- function(...){ | |
structure( | |
tibble(...), | |
class = c("listframe","tbl_df","tbl","data.frame") | |
) | |
} | |
lf <- listframe( | |
a = list(1,c("a","b","c"),matrix(1:4,2,2)), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(ggplot2) | |
ggplot() + annotate(x = -10, y=1, xend = -1.38, yend=3, geom='segment', col='white') + | |
geom_segment(data = data.frame(x = -1.38, y = seq(3.0, 3.0, len=30), | |
xend = seq(1.4, 1.1, len=30), yend = seq(3.0, 3.5, len=30)), | |
aes(x, y, xend=xend, yend=yend), col='#ffffff10') + | |
geom_segment(data = data.frame(id=1:30, x = seq(1.1, 1.35, len=30), y = seq(3.5, 3.0, len=30), | |
xend = seq(10, 10, len=30), yend = seq(2.0, 1.0, len=30)), | |
aes(x, y, xend = xend, yend = yend, col = factor(id))) + | |
geom_path(data=NULL, aes(c(-3, 0, 3, -3), y = c(0,5.5,0,0)), col='white') + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
df <- as.data.frame(installed.packages(fields = c("RemoteType", "Repository"))) | |
to_reinstall <- df[df$Repository %in% "CRAN", "Package"] | |
install.packages(to_reinstall) |