Created
June 24, 2015 19:34
-
-
Save kbroman/8ea364ffe12ca24b5113 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Rcpp.h> | |
using namespace Rcpp; | |
// [[Rcpp::export]] | |
void r_message(std::string text) | |
{ | |
Rcpp::Function msg("message"); | |
msg(text); | |
} | |
/*** R | |
r_message("not suppressed") | |
suppressMessages(r_message("suppressed")) | |
message("not suppressed") | |
suppressMessages(message("suppressed")) | |
*/ |
I discussed this with @eddelbuettel in October: RcppCore/Rcpp#195
At that point, suppressMessages()
was working on the C++ call to message()
, but it's not working for me now. 😦
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do
message()
andsuppressMessages()
work in R, and why can't I callmessage()
from within C++ and then suppress it?