Question: Need help writing code in RStudio data=coasters variables=Name, Park, City, State, Country, Construction(Steel or Wood), Speed(km per hour), Height(meters), Length(meters), Inversions(Yes or No), Numinversions, Duration

Need help writing code in RStudio

data=coasters

variables=Name, Park, City, State, Country, Construction(Steel or Wood), Speed(km per hour), Height(meters), Length(meters), Inversions(Yes or No), Numinversions, Duration (seconds),GForce,Opened, Region.

1A. Compare coasters that opened before 1980 to coasters that opend after 1980. First we will need to create a variable that indicates whether the coaster is old (before 1980) and new (after 1980). We can use the mutate function and the command `ifelse'. We want to create a variable that gives the coaster an "old" if Opened<1980 and "new" for everything else. Fill in the code below to do this. Most of the code is already filled in. Try to decipher for yourself what the code is doing.

```{r} coasters_summary<-coasters%>% mutate(old_new=ifelse( <1980,"old"," ")) ```

1B. Create an appropriate graph that compares speed of old and new coasters.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!