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.