library(dplyr, warn.conflicts = FALSE)
df <- tibble(
f1 = factor(c("a", "a", "a", "b", "b"), levels = c("a", "b", "c")),
f2 = factor(c("d", "e", "d", "e", "f"), levels = c("d", "e", "f")),
x = c(1, 1, 1, 2, 2),
y = 1:5
)
- JIRA: https://issues.apache.org/jira/browse/ARROW-3204?jql=project%20%3D%20ARROW%20AND%20status%20in%20(Open%2C%20%22In%20Progress%22%2C%20Reopened)%20AND%20component%20%3D%20R
- GitHub: https://github.com/apache/arrow/labels/lang-R
- vctrsのinteger64サポート: r-lib/vctrs#122
- sparklyrのApache Arrow対応: sparklyr/sparklyr#1611 (これはScala側?)
このgistは、以下のブログ記事からas_tibble()
の気になる部分だけを抜き出したものです。
他の変更点について詳しくは元記事を読んでください。
https://www.tidyverse.org/articles/2018/11/tibble-2.0.0-pre-announce/
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
library(tidyverse) | |
library(magick) | |
# the speed of involute increases uniformly; in order to make the lengths between | |
# steps equal, we need to calculate the square root | |
resolution_of_involute <- 10000L | |
t <- sqrt(seq(0, resolution_of_involute) / resolution_of_involute) | |
coil_turns <- 17L | |
max_r <- coil_turns * 2 * pi |
library(tidyverse)
library(magick)
#> Linking to ImageMagick 6.9.9.14
#> Enabled features: cairo, freetype, fftw, ghostscript, lcms, pango, rsvg, webp
#> Disabled features: fontconfig, x11
img_file <- tempfile(fileext = ".png")
download.file("https://hoxo-m.com/img/team/makiyama.png", destfile = img_file, mode = "wb")
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
library(tidyverse) | |
library(magick) | |
steps <- 10000L | |
coil_turns <- 3L | |
max_r <- coil_turns * 2 * pi | |
imgs <- image_graph(300, 300, res = 30) | |
rotation <- pi/4 |
library(ggplot2)
library(sf)
#> Linking to GEOS 3.6.1, GDAL 2.2.3, PROJ 4.9.3
nc <- st_read(system.file("gpkg/nc.gpkg", package="sf"), quiet = TRUE)
ggplot() +
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
# 参考: | |
# - https://github.com/rwinlib/arrow | |
# - https://github.com/apache/arrow/blob/master/cpp/apidoc/Windows.md#building-using-visual-studio-msvc-solution-files | |
# Update packages | |
pacman -Syu | |
pacman -Su | |
# Use Rtools | |
export CC=/c/Rtools/mingw_64/bin/gcc |
library(tidyverse)
library(gghighlight)
mtcars %>%
select(mpg,cyl,disp,hp,drat) %>%
gather(variable, value, -disp, -hp, -drat, -cyl) %>%
mutate(cyl = factor(cyl)) %>%
ggplot(aes(disp,value,color=factor(drat))) +
facet_wrap( ~ cyl, labeller = label_both, drop = FALSE) +