Pink dots appear in files and unable to save files intermittently MacOS High Sierra

I don't have all the info you requested, but here is a screenshot from this morning.

Snip20180525_1

The x error from RStudio is:
unexpected token ''

This is a file that was on my Desktop, so no network drives were involved.

When I view the characters in terminal using a more command, here is how they appear:
^@^@^@^@^@^@^@^@

Running the code works with no errors caused by the pink dots. So, the problem is one of annoyance and confusion about the code having errors.