title | tags | author | slide |
---|---|---|---|
Rmdスライドにグリッドレイアウトを導入(revealjs+Pure.css) |
RStudio RMarkdown |
mokztk |
false |
この記事は、RStudio Advent Calendar 2017 - Qiita 11日目の記事です。 RStudioそのものではなく、Rmdによるスライド作成の話題で恐縮ですが投稿させて頂きます。
# R 4.0.2 and RStudio server with some packages. | |
# MRAN library fixed at 2020-06-26 (the day 4.0.2 first came to MRAN) | |
FROM ubuntu:18.04 | |
# Change environment to Japanese (Character, DateTime, and Fonts) | |
ENV DEBCONF_NOWARNINGS=yes | |
RUN set -x \ | |
# install Japanese lung pack (and locales) | |
&& apt-get update \ |
# R 4.0.0 and RStudio server with some packages. | |
# MRAN library fixed at 2020-06-06 (the day 4.0.1 source code was released) | |
FROM ubuntu:18.04 | |
# Change environment to Japanese (Character, DateTime, and Fonts) | |
ENV DEBCONF_NOWARNINGS=yes | |
RUN set -x \ | |
# install Japanese lung pack (and locales) | |
&& apt-get update \ |
# R 3.6.3 and RStudio server with some packages. | |
FROM rocker/tidyverse:3.6.3 | |
# Change environment to Japanese (Character and DateTime) | |
# Ref: Dockerfile of rockerjp/tidyverse | |
ENV LANG=ja_JP.UTF-8 \ | |
LC_ALL=ja_JP.UTF-8 | |
RUN set -x \ | |
&& sed -i '$d' /etc/locale.gen \ |
# {party} を使った Survival CART 解析 | |
# Ref: http://rcommanderdeigakutoukeikaiseki.com/survival_CART.html | |
# {party} の読み込み | |
if(!require("party")){ | |
install.packages("party", dep = TRUE, repos = "https://cloud.r-project.org/") | |
} | |
library("party") | |
# party::node_surv() を一部書き換えて、終端ノードの生存曲線の色と太さを指定できるようにする |
title | tags | author | slide |
---|---|---|---|
Rmdスライドにグリッドレイアウトを導入(revealjs+Pure.css) |
RStudio RMarkdown |
mokztk |
false |
この記事は、RStudio Advent Calendar 2017 - Qiita 11日目の記事です。 RStudioそのものではなく、Rmdによるスライド作成の話題で恐縮ですが投稿させて頂きます。
title | tags | author | slide |
---|---|---|---|
特定時点のR環境をVagrantで再現する (Windows) |
R RStudio Vagrant |
mokztk |
false |
数年前に作成したRスクリプトやRmarkdownファイルを持ち出してきて現在の環境で実行すると、当時問題なかったはずのコードが思うように動かないことがあります。再利用するなら古いコードを書き直すことが望ましいですが、検証目的の場合など、改変したくない or できない場合もあります。 かといって、現在使っている解析環境でR本体やライブラリを依存関係を含めて入れ替えるのは大変ですし、他のプロジェクトの解析にも影響が出てしまう恐れがあります。
# R 3.6.1 and RStudio server with some packages. | |
FROM rocker/tidyverse:3.6.1 | |
# Change environment to Japanese (Character and DateTime) | |
# Ref: Dockerfile of rockerjp/tidyverse | |
ENV LANG=ja_JP.UTF-8 \ | |
LC_ALL=ja_JP.UTF-8 | |
RUN set -x \ | |
&& sed -i '$d' /etc/locale.gen \ |
#!/bin/bash -x | |
## provisioning script for RStudio Server on ubuntu / WSL | |
## MRAN library fixed at 2019-12-12 (the last day before 3.6.2) | |
sudo apt update | |
sudo apt upgrade -y | |
# Change environment to Japanese (Character and DateTime) | |
echo 'export LANG=ja_JP.UTF-8' >> ~/.bashrc |