京橋のバイオインフォマティシャンの日常

南国のビーチパラソルの下で、Rプログラムを打ってる日常を求めて、、Daily Life of Bioinformatician in Kyobashi of Osaka

R言語で使用できるデータセット一覧 〜 R package ‘datasets’ version 4.1.0 〜

はじめに

2021年4月現在、R言語で使用できるデータセット一覧をまとめてみた。

概要の和訳部分は、DeepLにて機械翻訳した。

# ToothGrowth の使用例
libary(datasets)

data(ToothGrowth)

head(ToothGrowth)
#   len supp dose
#1  4.2   VC  0.5
#2 11.5   VC  0.5
#3  7.3   VC  0.5
#4  5.8   VC  0.5
#5  6.4   VC  0.5
#6 10.0   VC  0.5

データセット一覧

データセット名 Description 概要説明 by DeepL
-- A --
ability.cov Ability and Intelligence Tests 能力・知能テスト
airmiles Passenger Miles on Commercial US Airlines, 1937-1960 米国民間航空会社の旅客マイル数、1937-1960年
AirPassengers Monthly Airline Passenger Numbers 1949-1960 月間航空旅客数、1949-1960年
airquality New York Air Quality Measurements ニューヨークの大気環境測定
anscombe Anscombe's Quartet of 'Identical' Simple Linear Regressions Anscombeの4つの「同一の」単純線形回帰法
attenu The Joyner-Boore Attenuation Data Joyner-Boore 減衰データ
attitude The Chatterjee-Price Attitude Data Chatterjee-Price Attitude Data(チャタジー・プライス態度データ
austres Quarterly Time Series of the Number of Australian Residents オーストラリア人居住者数の四半期時系列データ
-- B --
beaver1 Body Temperature Series of Two Beavers 2匹のビーバーの体温系列
beaver2 Body Temperature Series of Two Beavers 2匹のビーバーの体温系列
beavers Body Temperature Series of Two Beavers 2匹のビーバーの体温シリーズ
BJsales Sales Data with Leading Indicator 先行指標付き売上データ
BJsales.lead Sales Data with Leading Indicator 先行指標付き販売データ
BOD Biochemical Oxygen Demand 生物化学的酸素要求量
-- C --
cars Speed and Stopping Distances of Cars 自動車の速度と停止距離
ChickWeight Weight versus age of chicks on different diets 異なる飼料を与えた場合のヒナの体重と年齢の関係
chickwts Chicken Weights by Feed Type 飼料別の鶏の体重
CO2 Carbon Dioxide Uptake in Grass Plants イネ科植物の炭酸ガス吸収量
co2 Mauna Loa Atmospheric CO2 Concentration マウナロアの大気中の二酸化炭素濃度
crimtab Student's 3000 Criminals Data 学生の3000人の犯罪者データ
-- D --
datasets The R Datasets Package R Datasetsパッケージ
discoveries Yearly Numbers of Important Discoveries 重要な発見の年ごとの数
DNase Elisa assay of DNase DNaseのエリサアッセイ
-- E --
esoph Smoking, Alcohol and (O)esophageal Cancer 喫煙・アルコールと食道癌
euro Conversion Rates of Euro Currencies ユーロ通貨の換算レート
euro.cross Conversion Rates of Euro Currencies ユーロ通貨の換算レート
eurodist Distances Between European Cities and Between US Cities ヨーロッパの都市間およびアメリカの都市間の距離
EuStockMarkets Daily Closing Prices of Major European Stock Indices, 1991-1998 欧州主要株価指数の日次終値(1991-1998年
-- F --
faithful Old Faithful Geyser Data オールドフェイスフル間欠泉のデータ
fdeaths Monthly Deaths from Lung Diseases in the UK 英国における肺疾患による月間死亡者数
Formaldehyde Determination of Formaldehyde ホルムアルデヒドの測定値
freeny Freeny's Revenue Data Freeny's Revenue Data(英語
freeny.x Freeny's Revenue Data Freeny's Revenue Data(フリーニーの収益データ
freeny.y Freeny's Revenue Data Freeny's Revenue Data(フリーニーの収益データ

データセット名 Description 概要説明 by DeepL
-- H --
HairEyeColor Hair and Eye Color of Statistics Students 統計学生の髪と目の色
Harman23.cor Harman Example 2.3 ハーマンの例題2.3
Harman74.cor Harman Example 7.4 ハーマンの例 7.4
-- I --
Indometh Pharmacokinetics of Indomethacin Indomethacinの薬物動態
infert Infertility after Spontaneous and Induced Abortion 自然流産・人工流産後の不妊症について
InsectSprays Effectiveness of Insect Sprays 虫除けスプレーの効果
iris Edgar Anderson's Iris Data エドガー・アンダーソンの花菖蒲データ
iris3 Edgar Anderson's Iris Data エドガー・アンダーソンのアイリス・データ
islands Areas of the World's Major Landmasses 世界の主要なランドマークの面積
-- J --
JohnsonJohnson Quarterly Earnings per Johnson & Johnson Share ジョンソン・エンド・ジョンソンの1株あたりの四半期収益
-- L --
LakeHuron Level of Lake Huron 1875-1972 ヒューロン湖の水位(1875年~1972年
ldeaths Monthly Deaths from Lung Diseases in the UK 英国における肺疾患による月間死亡者数
lh Luteinizing Hormone in Blood Samples 血液中の黄体形成ホルモンについて
LifeCycleSavings Intercountry Life-Cycle Savings Data 国際的なライフサイクルにおける貯蓄データ
Loblolly Growth of Loblolly pine trees Loblolly pineの成長
longley Longley's Economic Regression Data Longleyの経済回帰データ
lynx Annual Canadian Lynx trappings 1821-1934 1821-1934年のカナダオオヤマネコの年間捕獲数
-- M --
mdeaths Monthly Deaths from Lung Diseases in the UK 英国における肺疾患による月間死亡者数
morley Michelson Speed of Light Data マイケルソンの光速データ
mtcars Motor Trend Car Road Tests モータートレンドの車のロードテスト
-- N --
nhtemp Average Yearly Temperatures in New Haven ニューヘブンの年間平均気温
Nile Flow of the River Nile ナイル川の流れ
nottem Average Monthly Temperatures at Nottingham, 1920-1939 ノッティンガムの月別平均気温(1920-1939年
npk Classical N, P, K Factorial Experiment 古典的なN、P、Kの要因実験

データセット名 Description 概要説明 by DeepL
-- O --
occupationalStatus Occupational Status of Fathers and their Sons 父親とその息子の職業的地位
Orange Growth of Orange Trees オレンジの木の成長
OrchardSprays Potency of Orchard Sprays 果樹園での散布物の効力
-- P --
PlantGrowth Results from an Experiment on Plant Growth 植物の成長に関する実験の結果
precip Annual Precipitation in US Cities 米国都市の年間降水量
presidents Quarterly Approval Ratings of US Presidents 米国大統領の四半期ごとの支持率
pressure Vapor Pressure of Mercury as a Function of Temperature 水銀の蒸気圧の温度依存性
Puromycin Reaction Velocity of an Enzymatic Reaction 酵素反応の反応速度
-- Q --
quakes Locations of Earthquakes off Fiji フィジーで発生した地震の場所
-- R --
randu Random Numbers from Congruential Generator RANDU 合同生成器RANDUからの乱数
rivers Lengths of Major North American Rivers 北米の主要河川の長さ
rock Measurements on Petroleum Rock Samples 石油岩石試料の測定
-- S --
Seatbelts Road Casualties in Great Britain 1969-84 イギリスの交通事故死者数 1969-84
sleep Student's Sleep Data 学生の睡眠データ
stack.loss Brownlee's Stack Loss Plant Data Brownleeのスタックロス・プラント・データ
stack.x Brownlee's Stack Loss Plant Data ブラウンリー社のスタックロスプラントのデータ
stackloss Brownlee's Stack Loss Plant Data ブラウンリー社のスタック・ロス・プラントのデータ
state US State Facts and Figures 米国の州のデータ
state.abb US State Facts and Figures US State Facts and Figures
state.area US State Facts and Figures アメリカの州のデータ
state.center US State Facts and Figures アメリカの州のデータ
state.division US State Facts and Figures アメリカの州のデータ
state.name US State Facts and Figures アメリカの州の情報とデータ
state.region US State Facts and Figures アメリカの州の情報とデータ
state.x77 US State Facts and Figures アメリカの州のデータ
sunspot.month Monthly Sunspot Data, from 1749 to "Present" 月間太陽黒点データ、1749年から "現在 "まで
sunspot.year Yearly Sunspot Data, 1700-1988 年間の太陽黒点数データ、1700年から1988年
sunspots Monthly Sunspot Numbers, 1749-1983 月間太陽黒点数、1749年から1983年
swiss Swiss Fertility and Socioeconomic Indicators (1888) Data Swiss Fertility and Socioeconomic Indicators (1888) データ
-- T --
Theoph Pharmacokinetics of Theophylline テオフィリンの薬物動態
Titanic Survival of passengers on the Titanic タイタニック号の乗客の生存率
ToothGrowth The Effect of Vitamin C on Tooth Growth in Guinea Pigs モルモットの歯の成長に対するビタミンCの効果
treering Yearly Treering Data, -6000-1979 年間樹木伐採データ、-6000-1979年
trees Diameter, Height and Volume for Black Cherry Trees ブラックチェリーの木の直径、高さ、体積
-- U --
UCBAdmissions Student Admissions at UC Berkeley カリフォルニア大学バークレー校における学生の受け入れについて
UKDriverDeaths Road Casualties in Great Britain 1969-84 英国の交通事故死者数 1969-84
UKgas UK Quarterly Gas Consumption 英国の四半期ごとのガス消費量
UKLungDeaths Monthly Deaths from Lung Diseases in the UK 英国における肺疾患による月間死亡者数
USAccDeaths Accidental Deaths in the US 1973-1978 米国における事故死 1973-1978年
USArrests Violent Crime Rates by US State 米国の州別凶悪犯罪率
UScitiesD Distances Between European Cities and Between US Cities ヨーロッパの都市間および米国の都市間の距離
USJudgeRatings Lawyers' Ratings of State Judges in the US Superior Court 米国の高等裁判所における州裁判官に対する弁護士の評価
USPersonalExpenditure Personal Expenditure Data 個人支出のデータ
uspop Populations Recorded by the US Census 米国国勢調査による人口統計

データセット名 Description 概要説明 by DeepL
-- V --
VADeaths Death Rates in Virginia (1940) バージニア州の死亡率(1940年
volcano Topographic Information on Auckland's Maunga Whau Volcano オークランドのMaunga Whau火山の地形情報
-- W --
warpbreaks The Number of Breaks in Yarn during Weaving 織物の際の糸の切れ目の数
women Average Heights and Weights for American Women アメリカ人女性の平均身長と体重
WorldPhones The World's Telephones 世界の電話機の数
WWWusage Internet Usage per Minute 1分あたりのインターネット使用量

Documentation for package ‘datasets’ version 4.1.0

以下のサイトを参照している。

stat.ethz.ch

参考資料

【Rのジミ〜な小技シリーズ】

skume.net

skume.net

skume.net

skume.net

skume.net

skume.net

skume.net

skume.net

skume.net

R言語 入門について関連図書

以下に関連図書を列挙しておきます。

RStudio 入門書

以下に関連図書を列挙しておきます。

分子モデリングシミュレーションソフトウェア AutoDock関連資料のまとめ

過去に作成した、Autodock関係の説明資料(AutoDock、AutoDock Vina、Raccoon、Ligplot+)をこちらにもまとめてみた。

AutoDock

AutoDock_japanese_ver.1.0

Autodock Vina

AutoDock_vina_japanese_ver.3.0

AutoDock Raccoon

AutoDock_Raccoon_japanese_ver.1.0

Ligplot+

Ligplot+_japanese_ver.1.1

関連webサイト

AutoDock 原著論文

AutoDockを使った関連論文

古いバージョンの資料

AutoDock_vina_japanese_ver.1.0

AutoDock_vina_japanese_ver.2.0

Rstudio-Server on CentOS7 のインストール方法 + nginxのリダイレクト設定 について

はじめに

CentOS7版Rstudio-Serverのインストール方法 + nginx設定についてまとめてみた。

Mac版やDocker版のRstudio-Serverのインストール方法については、以下の記事を参考のこと。

skume.net

skume.net

RStudio Server for Red Hat/CentOS のダウンロード・インストール

RStudio Server を動かすには、RedHat か CentOS 6以上のバージョンが必要である。

また以下の記事を参考にして、CetOS版Rをインストールしておくこと。

skume.net

まず、ターミナルを起動して、以下のコマンドを実行する。

wget https://download2.rstudio.org/server/centos7/x86_64/rstudio-server-rhel-1.4.1106-x86_64.rpm

sudo yum install rstudio-server-rhel-1.4.1106-x86_64.rpm

#パス確認
which rstudio-server
#/usr/sbin/rstudio-server

rstudio-serverのパスが通っていれば、OKである。

また、rstudio-serverのステータスを確認しておく。

#ステータス確認
rstudio-server status
#● rstudio-server.service - RStudio Server
 #  Loaded: loaded (/usr/lib/systemd/system/rstudio-server.service; enabled; vendor preset: disabled)
#   Active: active (running) since 火 2021-04-13 13:56:56 JST; 39s ago
#(中略)
#OR
# systemctl status rstudio-server.service

このあたりで、rpmファイルはもう不要なので、削除しておく。

#削除
rm -rf rstudio-server-rhel-1.4.1106-x86_64.rpm

ここで、一度、ウェブブラウザでrstudio-serverに接続してみる。

http://[Your IPアドレス]:8787にアクセスする。

コマンドで開く場合には、

open http://[Your IPアドレス]:8787

rserver.confファイルの設定

次に、rserver.confをvimで編集する。

sudo vim /etc/rstudio/rserver.conf

編集モード(i)にして、以下をコピー&ペーストして、vimを保存(:wq)する。

# Server Configuration File
www-address=127.0.0.1

ちゃんと保存されたかを確認しておく。

#確認
cat /etc/rstudio/rserver.conf

rsession.confファイルの設定

次に、rsession.confをvimで編集する。

sudo vim /etc/rstudio/rsession.conf

同じく、以下をコピー&ペーストして、vimを保存(:wq)する。

# R Session Configuration File
r-cran-repos=https://cran.csiro.au/
session-timeout-minutes=0

ここで、r-cran-reposについては、任意のリポジトリでOK。

こちらも、ちゃんと保存されたかを確認しておく。

#確認
cat /etc/rstudio/rsession.conf

rserver.confとrsession.confが設定できたら、 ひとまず設定を反映させる。

#設定の反映
sudo rstudio-server restart

以下、よく使うrstudio-serverのコマンドを記載しておく。

#スタート
$ sudo rstudio-server start

#ステータス確認
$ sudo rstudio-server status

#リスタート
$ sudo rstudio-server restart

#ストップ
$ sudo rstudio-server stop

CentOS版 nginx の設定

まずは、nginxをインストールして、有効化しておく。

sudo yum install nginx

#バージョン確認
nginx -v
#nginx version: nginx/1.16.1

#有効化
sudo systemctl enable nginx

次に、/etc/nginx/内の設定ファイル(nginx.confとか)を編集する。

#nginxフォルダの確認
ls /etc/nginx

#nginx.confの中身を表示
cat /etc/nginx/nginx.conf

以下のように出力される。

# For more information on configuration, see:
#   * Official English Documentation: http://nginx.org/en/docs/
#   * Official Russian Documentation: http://nginx.org/ru/docs/

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;

events {
    worker_connections 1024;
}

http {
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile            on;
    tcp_nopush          on;
    tcp_nodelay         on;
    keepalive_timeout   65;
    types_hash_max_size 2048;

    include             /etc/nginx/mime.types;
    default_type        application/octet-stream;

    # Load modular configuration files from the /etc/nginx/conf.d directory.
    # See http://nginx.org/en/docs/ngx_core_module.html#include
    # for more information.
    include /etc/nginx/conf.d/*.conf;

    server {
        listen       80 default_server;
        listen       [::]:80 default_server;
        server_name  _;
        root         /usr/share/nginx/html;

        # Load configuration files for the default server block.
        include /etc/nginx/default.d/*.conf;

        location / {
        }

        error_page 404 /404.html;
            location = /40x.html {
        }

        error_page 500 502 503 504 /50x.html;
            location = /50x.html {
        }
    }

# Settings for a TLS enabled server.
#
#    server {
#        listen       443 ssl http2 default_server;
#        listen       [::]:443 ssl http2 default_server;
#        server_name  _;
#        root         /usr/share/nginx/html;
#
#        ssl_certificate "/etc/pki/nginx/server.crt";
#        ssl_certificate_key "/etc/pki/nginx/private/server.key";
#        ssl_session_cache shared:SSL:1m;
#        ssl_session_timeout  10m;
#        ssl_ciphers HIGH:!aNULL:!MD5;
#        ssl_prefer_server_ciphers on;
#
#        # Load configuration files for the default server block.
#        include /etc/nginx/default.d/*.conf;
#
#        location / {
#        }
#
#        error_page 404 /404.html;
#            location = /40x.html {
#        }
#
#        error_page 500 502 503 504 /50x.html;
#            location = /50x.html {
#        }
#    }

}

nginx.confの再作成・編集

上記を編集しても良いが、再作成するのが手っ取り早いので、その方法を紹介する。

いったんnginx.confを削除して、vimで再作成・編集する。

#削除
sudo rm -rf /etc/nginx/nginx.conf

#再作成・編集
sudo vim /etc/nginx/nginx.conf

そこで、編集モード(i)に変更して、以下をそのままコピー&ペーストする。

user  nginx;
worker_processes  1;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    server_tokens off;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    include /etc/nginx/conf.d/default.conf;
}

編集が終われば、vimを保存(:wq)する。

default.confの作成・編集

次に、/etc/nginx/conf.d/default.confファイルを作成・編集する。

sudo vim /etc/nginx/conf.d/default.conf

そして、vimで編集モード(i)に変更して、以下をそのままコピー&ペーストする。

server {
    listen 80;
    server_name localhost;
   
location / {
root  /usr/share/nginx/html;
index index.html index.htm;
}
 
    location /rstudio/ {
      rewrite ^/rstudio/(.*)$ /$1 break;
      proxy_pass http://localhost:8787;
      proxy_redirect http://localhost:8787/ $scheme://$http_host/rstudio/;

    }
  }

編集が終われば、vimを保存(:wq)する。

nginxの再起動

ここまで出来たら、nginxを再起動する。

#nginxの再起動
sudo nginx -s reload

#OR
#停止
# nginx -s stop
#起動
# sudo service nginx start

これで、nginxの設定は終了。

リダイレクトの確認

ウェブブラウザで、以下のアドレスにアクセスできたら、完了。

http://[Your IPアドレス | Your SSID]/rstudio

#OR
#コマンドで開く場合には、
open http://[Your IPアドレス | Your SSID]/rstudio

参照資料

www.rstudio.com