Tip
In some versions of R Studio, there is a known issue where inline chunk execution (using the play button) may run a different chunk of code than the chunk selected when in Visual mode. If this happens, try switching to Source mode then back to Visual mode to fix the issue.