Skip to content

Instantly share code, notes, and snippets.

🍣
Nobody loves you

Hiroaki Yutani yutannihilation

🍣
Nobody loves you
Block or report user

Report or block yutannihilation

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View geom_liquid_area.md
library(ggplot2)

# functions -----------------------------------------------

geom_liquid_area <- function(mapping = NULL, data = NULL, stat = "identity",
                             position = "stack", na.rm = FALSE, show.legend = NA,
                             inherit.aes = TRUE, ...) {
  layer(
    data = data,
View chromote_wait_for_error.md
library(chromote)

Sys.setenv(CHROMOTE_CHROME="/usr/bin/chromium")

b <- ChromoteSession$new()
b$Page$navigate("https://www.instagram.com/")
#> $frameId
#> [1] "7A4B060856C628A9F30A449F9F443F42"
#> 
View capture_ggplot2.md
library(ggplot2)
library(rlang)

ggplot <- function(...) {
  f <- function(...) list(clone = f)
  structure(
    list(
      call = sys.call()
    ),
View crash_course_curly_curly.md
library(dplyr, warn.conflicts = FALSE)

# c.f. https://github.com/r-lib/rlang/issues/906
quatro_curly <- function(data, what) {
  data %>% summarise("{{ what }}" := mean({{ what }}))
}
quatro_curly(mtcars, mpg)
#>        mpg
#> 1 20.09062
View caTools-package.diff
diff -uprN caTools_archives/1.17.1.3/man/caTools-package.Rd caTools_archives/1.17.1.4/man/caTools-package.Rd
--- caTools_archives/1.17.1.3/man/caTools-package.Rd 2014-04-21 17:24:51.000000000 +0900
+++ caTools_archives/1.17.1.4/man/caTools-package.Rd 2020-01-14 00:24:16.000000000 +0900
@@ -50,6 +50,7 @@ trapz Trapezoid Rule N
scale="always", comment="Maunga Whau Volcano")
y = read.gif("volcano.gif", verbose=TRUE, flip=TRUE)
image(y$image, col=y$col, main=y$comment, asp=1)
+ file.remove("volcano.gif")
# test runmin, runmax and runmed
@yutannihilation
yutannihilation / nomad.md
Last active Jan 7, 2020
Nomadについて調べたこと
View nomad.md

Nomad

Intro

Nomadとは

  • cluster manager
  • task scheduler
View write_parquet_timezone.md

It seems we need to wait ARROW-3543 for preserving timezones.

library(arrow)
#> 
#> Attaching package: 'arrow'
#> The following object is masked from 'package:utils':
#> 
#>     timestamp
View interpolate=FALSE.md
devtools::load_all("~/repo/R/ggplot2")
#> Loading ggplot2

p <- ggplot(base::data.frame(x = 1:3)) +
  geom_point(aes(x, x, colour = x))

get_colourbar <- function(nbin) {
  p <- p + scale_color_gradient(
    paste0("nbin =\n", nbin),
@yutannihilation
yutannihilation / multiple-textGrob.md
Last active Aug 20, 2019
It seems the grob settings are vectorized over x and y
View multiple-textGrob.md
library(grid)

g <- textGrob(
  label = c("1", "2", "3"),
  gp = gpar(
    fontsize = 1:3 * 50,
    cex = 1,
    fontfamily = "",
    fontface = "plain",
@yutannihilation
yutannihilation / read_parquet.md
Last active Aug 1, 2019
Read parquet files from R by using Apache Arrow
View read_parquet.md

Read Parquet files from R

Prerequisite

Install libarrow and libparquet.

git clone https://github.com/apache/arrow/
You can’t perform that action at this time.