On Sat, Jan 5, 2019 at 9:41 AM Dirk Eddelbuettel <e...@debian.org> wrote: > > > On 5 January 2019 at 09:14, William Dunlap via R-help wrote: > | You would get these errors ("R: file or directory not found, version: file > | or directory not found...") if you had a ~/.Rprofile file containing the > | line 'cat(version$version.string, sep="\n"). > > Well spotted -- very much so. That is bound to break use within src/Makevars > and alike. If you must do something in ~/.Rprofile either make it silent, or > make it conditional based on if (interactive()) { ...that_code_here... }
Interesting problem. One way to workaround this startup issue with: PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` used by minqa:src/Makevars (https://r-forge.r-project.org/scm/viewvc.php/pkg/minqa/src/Makevars?view=markup&root=optimizer), could be to use something like: PKG_LIBS = `Rscript -e "cat('LDFLAGS:\n')" -e "Rcpp:::LdFlags()" | grep -A 999 "LDFLAGS:" | grep -v "LDFLAGS:"` and analogously for src/Makevars.win. But in the bigger picture, maybe there's room for an R/Rscript option to silence all R startup stdout and/or stderr output? For example, Rscript --quiet-startup -e "Rcpp:::LdFlags()"` /Henrik PS. It's probably better to output to stderr in .Rprofile, e.g. by always using message() instead of cat(). However, that cannot be assumed to always be the case. > > Dirk > > -- > http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.