Skip to content

Instantly share code, notes, and snippets.

View kazutan's full-sized avatar
🍺

Kazuhiro Maeda kazutan

🍺
View GitHub Profile
@kazutan
kazutan / hakata_udon_list.md
Created October 11, 2018 00:19
博多駅近辺のうどん屋さんリスト
@kazutan
kazutan / Vagrantfile
Last active September 7, 2017 08:49
RStudio Server v1.1.xをvagrantで準備するためのvagrantfile(ベース)
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
# 共有ディレクトリ設定(中身を適宜書き込む)
config.vm.synced_folder "(ローカルのディレクトリパス)", "(仮想側のディレクトリパス)"
# ポートフォワーディング設定
# for RStudioServer
config.vm.network "forwarded_port", guest: 8787, host: 1111
library(dplyr)
library(tidyr)
#データセット準備
df1 <- data.frame(id = 101:106,
x1 = sample(1:2, 6, replace = TRUE))
#全て1の値の変数noを追加
# joinでうまく入ってくれるようにするため
df1 <- df1 %>%
@kazutan
kazutan / first_setting.R
Created April 23, 2017 03:37
最初に入れていくパケージ群。
# インストール環境を整える
install.packages("devtools")
devtools::install_github("hoxo-m/githubinstall")
# tidyverse群
githubinstall::githubinstall("tidyverse")
githubinstall::githubinstall("dplyr")
# rmarkdown関連
githubinstall::githubinstall("rmarkdown")
@kazutan
kazutan / xaringan_output_test.Rmd
Created April 22, 2017 17:15
xaringanでの出力エリアを指定するセレクタ。詳しくはcssチャンクを。
---
title: "test"
output:
xaringan::moon_reader: default
---
```{css}
/* echo=true時のr出力ブロック */
.remark-slide-content > pre:first-of-type {
overflow: auto;
@kazutan
kazutan / multi_widgets_combing.Rmd
Created April 12, 2017 16:11
datatableをlapplyで作成してcombining
---
title: "Untitled"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r}
@kazutan
kazutan / slidebar_test.R
Created March 13, 2017 08:34
shniyにcssを当てるテスト。
if (interactive()) {
options(device.ask.default = FALSE)
ui <- fluidPage(
# ここからcss設定の追加
tags$style(type = "text/css",
".shiny-input-container {background-color: #FF0000;}",
"form.well { background-color: #0000FF"),
# ここまでcss設定の追加
titlePanel("Hello Shiny!"),
@kazutan
kazutan / corrr_rplot_fontsize_control.R
Created March 10, 2017 08:17
corrr::rplotの相関係数のサイズ変更
library("corrr")
library("ggplot2")
# 差し替え用の関数
# サイズ指定用の引数をセット
rplot_kari <- function (rdf, legend = TRUE, shape = 16, colours = c("indianred2", "white", "skyblue1"), print_cor = FALSE, colors, size = 3)
{
if (!missing(colors))
colours <- colors
@kazutan
kazutan / docker-command-memo.md
Last active October 8, 2018 02:18
dockerコマンドの自分用メモ。

dockerコマンド自分用メモ。

Ubuntuを前提にしてるので,すべてsudoつき。

Dockerfileからローカルでbuild

$ sudo docker build -t (イメージ名) (Dockerfileのpath)

uikitフレームワークを使ったRmdテンプレ作成のログ

リポジトリとプロジェクト作成

  • Githubにリポジトリ作成
    • LICENSEは指定しとく
    • その墓は不要
  • clone
    • 作業していくディレクトリをgit cloneしてくる
  • httpsじゃなくてgitの方