Search code examples
rwindowsrscript

Rscript print a NULL in the windows


Rscript.exe -e "1"
# NULL
# [1] 1

Rscript.exe always prints a null in windows system. Any method to forbid it?

Environment

  • R: 4.3.3

Solution

  • That's likely coming from a profile file, either Rprofile.site or .Rprofile. See ?Startup for information on where those files are found.

    Use Rscript --vanilla -e "1" to avoid running them.