作成日 2015-07-22
最終更新日
概要
RStudioでは、コンソールに直接コマンドを入力していくのではなく、Rスクリプトと呼ばれるエディタを使用すると便利です。
使用する利点
テキストエディタのように使用できるので、内容の保存、読込み、修正が楽になります。
使用方法

Rスクリプトを新規作成します


「File」→「Save As」を選択し、名前を付けて保存します。

ベクトルを作成します。右上の枠にベクトルを入力します。
x <- c(-1, -0.8, -0.6, -0.4, -0.2, 0, 0.2, 0.4, 0.6, 0.8, 1) x

「Run」をクリックすると、カーソルが存在する行が、Consoleに挿入されます。1行づつ挿入されます。1行目で「Run」をクリック、
続いて、2行目で、「Run」をクリックしたときのConsoleの状態です。1行づつ、動作を確認しながら、入力するのが、意図された機能のようです。
