Codes created carefully are not working

This post was flagged by the community and is temporarily hidden.

Please have a look to our homework policy, homework inspired questions are welcome but they should not include verbatim instructions from your course.

Thanks so much for calling my attention to this. I did this, because I have done everything possible but the code would not run....... I thought maybe the code chunk box could be faulty...
Do I need to install packages such as 'tidyverse', or 'dplyr' in the code chunk box before running it?
I revisited my notes and lectures, and the code would not run, hence the reason I copied some of it.

I did not copy all, if you would observe...

I keep getting this and similar error, no matter how correctly I formatted by arguments, do you think I should first install relevant packages in the provided code chunk box?

Error in eval(expr, envir, enclos) : object 'flavor_df' not found
Calls: %>% ... select_vars_ -> -> lapply -> FUN -> eval -> eval

Sorry but I don't understand what you mean by "the provided code chunk box", can you be more specific about where are you executing the R code?

This error message makes no reference to a missing package but to a missing data frame, maybe you are supposed to run the code in a defined sequence and you have omitted some previous code where the data frame is defined.

I'm just guessing here because we don't have enough information to help you out, ideally, you should prepare a reproducible example (reprex) illustrating your issue. Please have a look at this guide, to see how to create one: