When I run
glimpse(iris) I get this:
Observations: 150 Variables: 5 $ Sepal.Length <dbl> 5.1, 4.... $ Sepal.Width <dbl> 3.5, 3.... $ Petal.Length <dbl> 1.4, 1.... $ Petal.Width <dbl> 0.2, 0.... $ Species <fct> setosa,...
Variable names are case sensitive in R so
sepal.length is not the same as
Sepal.Length. The x and y values in your ggplot command need to match the column names of iris exactly.
I'm having issues making a new column:
heart %>% mutate(RIDAGEMOS == RIDAGEYR * 12)
Error in mutate_impl(.data, dots) :
Evaluation error: object 'RIDAGEMOS' not found.
It seems like the same issue happens in the iris dataset, so it's not a problem with the
iris %>% mutate(Sepal.Scaled == Sepal.Length * 12) Error in mutate_impl(.data, dots) : Evaluation error: object 'Sepal.Scaled' not found.
What am I doing wrong?
=; the former is used to evaluate a comparison (https://apreshill.github.io/ohsu-basic-stats/slides/cm012.html#31). For mutate, please review the slides (https://apreshill.github.io/ohsu-basic-stats/slides/cm012.html#32). Also note that to make your
mutatestick, you'll want to save it to your data frame (https://apreshill.github.io/ohsu-basic-stats/slides/cm012.html#39)
heart_bp <- heart_bp %>% mutate(bp_ratio = BPXDI1 / BPXDI2) iris <- iris %>% mutate(Sepal.Scaled = Sepal.Length * 12)
Hi Hari, you should run the following code (in your console, not in a markdown doc!):
Once you've run this once in R, reprohealth should be installed and and you'll be able to call it with
?get_ci? http://infer.netlify.com/reference/get_ci.html Try running
sessionInfo()to see if you need to update the package.
I am now all of a sudden having the glue collapse error. I changed nothing between class and opening the assignment to finish it up tonight, so I am not sure what happened. I have so far, installed and updated glue, updated all other packages, reloaded my project, restarted rstudio, and my computer. My error gives a little more info than what I was seeing in class, and is failing during the gather contained in Alison's sneetches_tidy generation code. It says:
TRUEmust evaluate to column positions or names, not a logical vector
In addition: Warning message:
'glue::collapse' is deprecated.
Use 'glue_collapse' instead.
See help("Deprecated") and help("glue-deprecated").
Any help would be appreciated.