「R」の版間の差分
ナビゲーションに移動
検索に移動
(→ベクトル) |
|||
13行目: | 13行目: | ||
*[http://www.jaysong.net/dplyr_intro/ dplyr入門] | *[http://www.jaysong.net/dplyr_intro/ dplyr入門] | ||
*[https://oku.edu.mie-u.ac.jp/~okumura/stat/readr.html reader] | *[https://oku.edu.mie-u.ac.jp/~okumura/stat/readr.html reader] | ||
+ | ===代入=== | ||
+ | <pre> | ||
+ | > x <- log(100) | ||
+ | > x | ||
+ | [1] 4.60517 | ||
+ | </pre> | ||
+ | |||
===ベクトル=== | ===ベクトル=== | ||
*c() | *c() | ||
18行目: | 25行目: | ||
> sqrt(x) | > sqrt(x) | ||
[1] 1.000000 1.414214 1.732051 2.000000 | [1] 1.000000 1.414214 1.732051 2.000000 | ||
+ | |||
===関数定義=== | ===関数定義=== | ||
> hoge <- function(x, y){ | > hoge <- function(x, y){ |
2020年12月7日 (月) 01:55時点における版
目次
R
代入
> x <- log(100) > x [1] 4.60517
ベクトル
- c()
> x <- c(1,2,3,4) > sqrt(x) [1] 1.000000 1.414214 1.732051 2.000000
関数定義
> hoge <- function(x, y){ + return (x + y) + } > hoge(1,2) [1] 3
R Studio
- Alt + Shift + k : キーボードショートカット一覧
reader
library(readr) dataset <- read_csv("O1.csv") View(dataset)
dplyr
install
install.packages("dplyr")
Tips
Error in o1 %>% head : could not find function "%>%"
> install.packages("magrittr") > library(magrittr) Warning message: パッケージ ‘magrittr’ はバージョン 3.4.4 の R の下で造られました
© 2006 矢木浩人