I have a column name (dataset) that happens to have the same name as a new variable I define later on. Should I just use different variable names from column names or can this warning be improved?
Warning below (or whatever the exclamation point is supposed to be called )
Ok, I see. First, the option that turns this warning on or off is under Tools > Global Options as shown here (and indeed described a bit different from the actual warning):
Second, to get the mtcars example to exhibit this behavior, you need to remove the rename line:
df <- mtcars %>%
select(dataset)
Of course this means that dataset would now not actually be in your data.frame, but that does trigger the warning you describe. There may be something going wrong with the bit of code in lines ~31-33 in your original example?
Thanks for pointing me to the settings to turn off these warnings. I think I'm either going to do that or just simply ignore the warnings.
Perhaps it has something to do with me using a newer build of RStudio, but I still get the same behavior regardless if I use select only. Here is another example: