R4.1

以下のコードをR4.1.0で実行しようとして躓いた時のメモ。

 

install.packages("https://cran.r-project.org/bin/windows/contrib/3.7/insuranceData_
1.0.zip")
library(insuranceData)
data("dataCar") #insuranceData パッケージの[dataCar]を呼び出し

流したらrtoolsなるものが必要といわれる。

R4.0以降は必要なの?以下を参照しつつインストールしてPATHを通す。

indenkun.hatenablog.com

その後再実行すると以下のワーニング

Warning in install.packages :
package ‘https://cran.r-project.org/bin/windows/contrib/4.1/insuranceData_1.0.zip’ is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages

 でも、あちこちいじっているうちにデータが使えるようになっている。なんでだろう。。

 

考えても分からないので、とりあえず箱ひげ図(boxplot)とかヒストグラム(hist)を書いてみて今日はおしまい。