QuestionQuestion

Load the mushroom.txt data set into R.
a) Create a bar chart for the shape variable. Report the bar chart. What cap shape is most common?
b) Create a comparative bar chart using cap color and odor. Use stacked bars such that each bar represents a single odor. Include a legend. Report this bar chart.
c) Create a comparative bar chart using cap shape and color. Do not stack bars. Present such that the five classes are shown side-by-side for a single color. Include a legend. Report this bar chart. What color(s) has the most variability in shape?
d) Create a pie chart for the surface variable. Report the pie chart.

Load the 2017NBADraft2.txt data set into R.
a) Create a bar chart (with appropriate title) on the Position variable.
b) Create a comparative bar chart (with appropriate title) comparing whether they went to college within each position. Do not use stacked bars.
c) Create a comparative bar chart (with appropriate title) comparing position within each class year. Use stacked bars.
d) Create a pie chart (with appropriate title) on the Position variable.

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Output

```{r, echo=FALSE}
dat <- read.csv("2017NBADraft2.txt")

count.position <- table(dat$Position)
barplot(count.position,
       xlab = "Position",
       ylab = "Frequency of Position",
       main = "Position Distribution")
```

```{r, echo=FALSE}
count.position.college <- table(dat$College, dat$Position)

barplot(count.position.college,
       beside = TRUE,
       #legend = rownames(count.position.college),
         names.arg = colnames(count.position.college),
       #legend = rownames(count.color.odor),
       legend.text=TRUE,
    args.legend=list(
      x=ncol(count.position.college) + 3,
      y=max(colSums(count.position.college)),
      bty = "n"
    ),
       xlab = "Position if went to College or not",
       ylab = "Frequency of Position",
       main = "Position Distribution if went to college or not")...

By purchasing this solution you'll be able to access the following files:
Solution.zip.

50% discount

Hours
Minutes
Seconds
$20.00 $10.00
for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Statistics-R Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats