In the most recent update to R Studio ( 2023.03.0+386 ) there has been an issue of turning 2 spaces into a period "."
For example if I were to type
x <- 1
everything is fine, however if I put two spaces in it adds the period.
x. <- 1
The solution lies within my Mac OS and not R Studio. I found the solution here.
If you don’t want to insert a period when pressing the space bar twice, go to System Preferences > Keyboard, then select the Text tab. To the right of that window are several checkboxes for typing-related options. Simply uncheck the box labeled Add period with double-space, and you’ll be good to go.