tm <- quadmesh::triangmesh(volcano)
xyzg <- tibble::tibble(x = tm$vb[1, tm$it],
y = tm$vb[2, tm$it],
z = tm$vb[3, tm$it],
g = rep(seq_len(ncol(tm$it)), each = nrow(tm$it)))
library(ggplot2)
ggplot(xyzg, aes(x, y, group = g, fill = z)) +
geom_polygon()
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
#!/bin/bash | |
### steps #### | |
# verify the system has a cuda-capable gpu | |
# download and install the nvidia cuda toolkit and cudnn | |
# setup environmental variables | |
# verify the installation | |
### | |
### to verify your gpu is cuda enable check |
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
################################################################################ | |
# | |
# R.nanorc -- nano syntax-highlighting file for R | |
# | |
# Origin: This file is part of the pkgutils package for R. | |
# | |
# Usage: This file should be placed in a directory such as /usr/share/nano/ (on | |
# Ubuntu 12.04). That nano uses syntax highlighting at all might need to be | |
# enabled separately. |
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
# Find all CRAN package with FORTRAN code | |
packages <- c() | |
base_url <- 'https://api.github.com/search/repositories?q=user:cran%20language:fortran' | |
for(page in 1:100){ | |
url <- paste0(base_url, "&page=", page) | |
cat("Reading", url, "\n") | |
repos <- jsonlite::fromJSON(url) | |
if(!length(repos$items)) | |
break | |
packages <- c(packages, repos$items$name) |
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
scale_x_discrete(limits = rev(levels(the_factor))) |