[Bioc-devel] Suppressing messages from Rprofile

Mike Smith gr|mbough @end|ng |rom gm@||@com
Wed Apr 7 17:15:28 CEST 2021


I have the following line in the configure.ac for rhdf5filters, which
returns the location of the HDF5 headers distributed with Rhdf5lib:

RHDF5_INCLUDE=`"${R_HOME}/bin${R_ARCH_BIN}/Rscript" -e
'cat(system.file("include", package="Rhdf5lib"))'`

For me the output is a path like
 /mnt/data/R-lib/4.0.3-bioc_3.12/Rhdf5lib/include, which gets inserted into
the package Makevars file, and the package compilation works.

However I've had multiple reports (
https://github.com/grimbough/rhdf5filters/issues/11) where this doesn't
work, all of which seem to relate to messages printed when an Rprofile is
loaded.  They have well intentioned messages like below, which don't work
so well when passed as compiler flags

[1] "[BMRC] You have sourced the BMRC Rprofile provided at
/apps/misc/R/bmrc-r-user-tools/Rprofile"
[1] "[BMRC] Messages coming from this file (like this one) will be
prefixed with [BMRC]"
[1] "[BMRC] You are running R on host <rescomp3.hpc.in.bmrc.ox.ac.uk>
with CPU <Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz>"
[1] "[BMRC] While running on this host, local R packages will be
sourced from and installed to
/well/combat/users/ifl143/R/4.0/ivybridge"
/gpfs3/well/combat/users/ifl143/R/4.0/ivybridge/Rhdf5lib/include

I thought about using --vanilla but I use .Rprofile to set my library path,
so ignoring that file completely defeats the point in my setup.  Is anyone
aware of either a more reliable way of getting the information I want
(maybe suppressing messages, different mechanism entirely, etc)?
Alternatively, is there anything definitive in WRE or the like that
suggests printing messages Rprofile is a bad idea that I can pass on to the
users?

Cheers,
Mike

	[[alternative HTML version deleted]]



More information about the Bioc-devel mailing list