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
# decimal_date_strptime is: | |
register_binding("decimal_date_strptime", function(date) { | |
# browser() | |
y <- build_expr("year", date) | |
# timezone <- call_binding("tz", date) | |
start <- call_binding("make_datetime", year = y, tz = "UTC") | |
end <- call_binding("make_datetime", year = y + 1L, tz = "UTC") | |
# maybe use yday here | |
sofar <- call_binding("difftime", date, start, units = "secs") | |
total <- call_binding("difftime", end, start, units = "secs") |
I hereby claim:
- I am dragosmg on github.
- I am dragosmg (https://keybase.io/dragosmg) on keybase.
- I have a public key ASB7hObwhQjNh4fdt360hgZ4igZjQrFMQwA9LMcOlHiS9Ao
To claim this, I am signing this object:
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(arrow, warn.conflicts = FALSE) | |
library(dplyr, warn.conflicts = FALSE) | |
# target dataset size is 100k columns, 300k rows | |
# This is large, but we should be able to handle it (especially when it's | |
# partitioned). We can reduce the number of columns if we want to reproduce, but | |
# we should still be able to handle this (even if we're not perfectly tuned for it) | |
rows <- 300000 | |
cols <- 100000 | |
partitions <- 20 |
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
if (interactive()) { | |
# requires: devtools::install_github("gaborcsardi/prompt") | |
.prompt_grk <- function(...) { | |
dir <- if (rstudioapi::hasFun("getActiveProject") && | |
!is.null(rstudioapi::getActiveProject())) { | |
basename(rstudioapi::getActiveProject()) | |
} else { | |
basename(getwd()) | |
} |
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
if(interactive()) { | |
.__Rprofile_env__. <- new.env(parent = emptyenv()) | |
.__Rprofile_env__.[["install"]] <- pak::pkg_install | |
attach(.__Rprofile_env__.) | |
library(usethis, warn.conflicts = FALSE) | |
library(conflicted) | |
conflict_prefer("filter", "dplyr") | |
conflict_prefer("sql", "dbplyr") |
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
These code snippets have been tested on R 3.1.0 and Mac OS 10.9.3. They presumably do *not* work on R 2.X! | |
## Enter these commands in the Mac OS Terminal | |
# use faster vecLib library | |
cd /Library/Frameworks/R.framework/Resources/lib | |
ln -sf /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Versions/Current/libBLAS.dylib libRblas.dylib | |
# return to default settings | |
cd /Library/Frameworks/R.framework/Resources/lib |