Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1) Using R to replicate the dataframe, icecreamShop, and its structure below using your knowledge of dataframes, row names, and ordered factors and dates.Your output

1) Using R to replicate the dataframe, icecreamShop, and its structure below using your knowledge of dataframes, row names, and ordered factors and dates.Your output should exactly match the following two lines of R code.

> icecreamShop # (LINE 1)

firstNamelastNameagejobLeveljobTitlestartDate

1702ClutchMountainhawk35bossCEO2017-05-18

1603MadelineDoe26fulltimeProgrammer2017-05-29

1604AbbyJohnson22parttimeSecretary2018-01-02

1705BenBaker31fulltimeBusiness MGR2017-11-13

1709LafayetteLeopard23parttimeIntern2019-05-29

> str(icecreamShop) # (LINE 2)

'data.frame': 5 obs. of6 variables:

$ firstName: Factor w/ 5 levels "Abby","Ben","Clutch",..

$ lastName : Factor w/ 5 levels "Baker","Doe",..

$ age: num35 26 22 31 23

$ jobLevel : Ord.factor w/ 3 levels "parttime"<"fulltime"<..

$ jobTitle : Factor w/ 5 levels "Business MGR",..

$ startDate: Date, format: "2017-05-18" "2017-05-29" ...

```{r}

```

2) Write code to create new vector in the same dataframe as question #1 containing the number of years older each person is than the youngest person in icecreamShop.That is, the youngest person would have an entry in this vector with the value 0, and everyone older would have a larger entry value.

```{r}

```

3) Write expression (meaning only one line and no semicolons) that counts the number of people in icecreamShop who work part time.

```{r}

```

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Calculus Early Transcendentals

Authors: James Stewart, Daniel K. Clegg, Saleem Watson, Lothar Redlin

9th Edition

1337613924, 978-1337613927

More Books

Students also viewed these Mathematics questions