montanaanna.blogg.se

Rename x variables
Rename x variables




rename x variables

#Rename x variables code#

We saw the code for these in our Shiny workshop a couple weeks ago and luckily, this is pretty straightforward.įor a title, all you need to do is add a layer to your plot using the ggtitle function, and then put the title you want to see in quotes. The first thing we might want to do with a plot is to add a title or change the axis labels. Correlation is not causation, but the trend is interesting to see. Another way of looking at it is that cereals with zero sugar have the highest rating, between 1 and 7 grams per serving have a medium rating, and 8 or more has a low rating. Surpringly, the general trend is that the more sugar a cereal has, the lower the rating is. To get us started, let’s see if the amount of sugar correlates with the cereal’s rating. :320.0Īs you can see we have a relatively simple dataset with a few categorical variables and mostly continuous variables. # All-Bran with Extra Fiber: 1 P: 9 Mean :2.227

rename x variables

I’ve removed some of the columns to simplify the dataset and made it available on my website, so you can read it in straight from there. Today, we’ll look at another dataset made available through that contain nutritional information of 80 different kinds of cereal. Last week we looked at McDonald’s menu items.






Rename x variables