cppfile <- tempfile(fileext = ".cpp")
cat("
#include <Rcpp.h>
using namespace Rcpp;
// [[Rcpp::export]]
std::string std2std(const std::string &x) {
return x;
}
This file contains hidden or 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(dplyr) | |
con <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") | |
DBI::dbWriteTable(con, "mtcars", mtcars) | |
mtcars2 <- tbl(con, "mtcars") | |
mtcars2 | |
mtcars2 %>% | |
select(cyl) %>% |
This file contains hidden or 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
--- introduction.Rmd 2017-04-13 21:34:20.746708500 +0900 | |
+++ dplyr.Rmd 2017-04-13 21:32:54.691292800 +0900 | |
@@ -1,6 +1,5 @@ | |
--- | |
title: "Introduction to dplyr" | |
-date: "`r Sys.Date()`" | |
output: rmarkdown::html_vignette | |
vignette: > | |
%\VignetteIndexEntry{Introduction to dplyr} | |
@@ -13,6 +12,7 @@ |
This file contains hidden or 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
--- | |
title: "Untitled" | |
output: md_document | |
--- | |
```{r} | |
#Sample Dataframe | |
library(magrittr) | |
library(dplyr) | |
library(formattable) |
This file contains hidden or 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
# get all variable names | |
varnames <- paste0("Var", 1:50) | |
# get all variable values | |
varvalues <- sapply(varnames, function(x) get(x, envir = .GlobalEnv)) | |
# calculate new variable values | |
varvalues_new <- varvalues * 1:50 | |
# assign to the original variables |
This file contains hidden or 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
$ mkdir roots | |
$ wget -O - https://chromium.googlesource.com/chromium/src/+archive/master/net/data/ssl/symantec/roots.tar.gz | tar -x -f - -C roots/ | |
$ for cert in roots/*.pem; do openssl x509 -inform pem -in $cert -noout -text | grep 'Subject:'; done | sort -u | |
Subject: C=DE, O=TC TrustCenter GmbH, OU=TC TrustCenter Class 2 CA, CN=TC TrustCenter Class 2 CA II | |
Subject: C=DE, O=TC TrustCenter GmbH, OU=TC TrustCenter Class 4 CA, CN=TC TrustCenter Class 4 CA II | |
Subject: C=DE, O=TC TrustCenter GmbH, OU=TC TrustCenter Universal CA, CN=TC TrustCenter Universal CA I | |
Subject: C=DE, O=TC TrustCenter GmbH, OU=TC TrustCenter Universal CA, CN=TC TrustCenter Universal CA II | |
Subject: C=DE, O=TC TrustCenter GmbH, OU=TC TrustCenter Universal CA, CN=TC TrustCenter Universal CA III | |
Subject: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 1 CA/[email protected] | |
Subject: C=DE, ST=Hamburg, L=Hamburg |
This file contains hidden or 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
TokenSony <- R6::R6Class("TokenSony", inherit = Token2.0, list( | |
init_credentials = function() { | |
super$init_credentials() | |
# expires_inは秒数なので、POSIXctにしておく | |
self$credentials$expires_timestamp <- Sys.time() + self$credentials$expires_in | |
}, | |
refresh = function() { | |
super$refresh() | |
self$credentials$expires_timestamp <- Sys.time() + self$credentials$expires_in | |
}, |


This file contains hidden or 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
臼NG |