Bug/Issue with RStudio Interface

The line is meant to indicate a certain number of characters (e.g. 80 characters in a line). It is simply meant as a visual guide to help you when you write code/text, as often programmers may wish to hard or soft wrap their code at a certain length.

You can disable this by going to: Preferences > Code > Display and toggle the Show margin option.