作成日 2015.06.10
最終更新日 2015.06.10
概要
R言語では、オブジェクトは、データを格納するコンテナの事です。C#やVB、VBAで言うところの、コレクションと呼ばれる変数のまとまりです。
操作

起動アイコンをダブルクリックして、RStudioを起動します。必要であれば、更新を確認して、RStudioを更新します。

左下のコンソールウィンドウの一番下の行が入力行です。ここに、キーボードで、コマンドを入力します。
オブジェクトを作成する

「オブジェクト名」<-「値、あるいは、ベクトル」で、オブジェクトを作成することができます。
ここでは、サイコロを想定して、オブジェクト名 diceに、1~6のベクトルを格納しています。
オブジェクト名の後に、[Enter]を入力すると、オブジェクトの内容が表示されます。
「Environment」ペイン

RStudioウィンドウの右上、「Environment」ペインに、作成されたオブジェクトが表示されます。
オブジェクト名に使えない文字
以下の記号
$, %, ^, *, +, -, (, ), [, ], #, !, ?, <, >, =, _
予約語
if, else, repeat, while, function, for, in, next, break, TRUE, FALSE, NULL, Inf, NaN, NA, NA_integer_, NA_real_, NA_complex_, NA_character
ls()関数

ls()関数を使うとすでに使用しているオブジェクト関数が確認できます。
