I was stumbling on this “incomplete final line found on Rprofile” error while installing d3rain package with the following code
remotes::install_github("daranzolin/d3rain"). In one of the previous post I was modifying my Rprofile.site file and there is definitely a connection with this error.
The solution to this error is a blank line at the end of your Rprofile script.
One way to do that is with this function:
The result looks like this.