Question
R-Studio help download.file(http://www.openintro.org/stat/data/mlb11.RData, destfile = mlb11.RData) load(mlb11.RData) Exercises. 4.Make a new variable, high_BA , to represent teams that hit for a batting average of 0.270
R-Studio help
download.file("http://www.openintro.org/stat/data/mlb11.RData", destfile = "mlb11.RData")
load("mlb11.RData") Exercises.
4.Make a new variable, high_BA , to represent teams that hit for a batting average of 0.270 or more. How many teams fit into this group?
### Enter code here
15. You can use favstats to get the summary statistics within each high_BA group, and bwplot() to make boxplots. For example, what appears to be the link between homeruns and high_BA? Do teams with higher batting averages tend to hit more home runs?
favstats (homeruns ~ high_BA, data = mlb11)
densityplot (~ homeruns, groups = high_BA, data = mlb11, auto.key = TRUE)
16. Repeat the code above, only using stolen bases instead of homeruns. Does there appear to be a link between stolen bases and high_BA?
### Enter code here.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started