mtcars: Rのビルトインデータフレーム

Rのビルトインデータフレーム : mtcars

ビルトインのmtcars データフレーム。 1974年の『Motor Trend US』誌から抜粋した、32台(1973~74年モデル)の自動車の燃費と、自動車のデザインと性能の10の側面から構成されている。 詳細については、 help(mtcars)でドキュメントを参照。

plot(mpg ~ wt, data = mtcars, col=2) # Weight (1000 lbs) - mpg    Miles/(US) gallon
[, 1]   mpg Miles/(US) gallon
[, 2]   cyl Number of cylinders
[, 3]   disp    Displacement (cu.in.)
[, 4]   hp  Gross horsepower
[, 5]   drat    Rear axle ratio
[, 6]   wt  Weight (1000 lbs)
[, 7]   qsec    1/4 mile time
[, 8]   vs  Engine (0 = V-shaped, 1 = straight)
[, 9]   am  Transmission (0 = automatic, 1 = manual)
[,10]   gear    Number of forward gears
[,11]   carb    Number of carburetors

燃費( mpg )と重量( wt )は逆相関の関係。 f:id:datablogger:20200420172948p:plain