search for: mufflemessage

Displaying 17 results from an estimated 17 matches for "mufflemessage".

2023 Feb 19
2
R: determine if `suppressMessages()` has been invoked
...whether they want to see it. > I was looking through [R Internals], but I haven't found an answer. I > do not understand **how** suppressMessages works. It works by cooperating with message(). message() itself works by trying to raise a "message" condition and providing a "muffleMessage" restart that does nothing. If the condition wasn't handled (the "muffleMessage" restart wasn't called by the handler), the text of the message is printed. In turn, suppressMessages() sets up a handler for conditions of class "message" that invokes the "muffleM...
2023 Feb 19
1
R: determine if `suppressMessages()` has been invoked
Hi all, I would like to create a function that detects if suppressMessages has been invoked upon running that same function. I was looking through {https://cran.r-project.org/doc/manuals/r-release/R-ints.html}, but I haven't found an answer. I do not understand **how** suppressMessages works. I have not received an answer on SO
2015 Sep 10
2
Using IDs to suppress specific messages and warnings
...vided get muffled. Something like: suppressMessages <- function (expr, ids = NULL) { withCallingHandlers( expr, message = function(c) { if(is.null(ids) || (inherits(c, "simpleMessage") && c$id %in% as.character(ids))) { invokeRestart("muffleMessage") } } ) } The hard part is providing IDs for all the existing messages in R and its packages. It's certainly do-able, but I imagine would take quite a lot of time. Is there any enthusiasm for implementing this feature, or something like it? -- Regards, Richie Learning R...
2019 Jun 21
0
Suggested Patch: Library returns matching installed packages when typo present
...method is less likely to cause conflicts. Is it correct that you are proposing something that allows us to do: registerDefaultConditionHandlers( packageStartupMessage = function(c) { ## Do something with condition 'c' ... ## Suppress futher processing invokeRestart("muffleMessage") } ) at the core, which avoids having us to wrap up calls in withCallingHandlers() at top-level calls, e.g. > withCallingHandlers({ library("foobar"), }, packageStartupMessage = function(c) { ## Do something with condition 'c' ... ## Suppress futher processing...
2019 Jun 21
2
Suggested Patch: Library returns matching installed packages when typo present
Hi Luke, Thank you for your response. On 6/21/19 10:56 AM, Tierney, Luke wrote: Thanks for the suggestion. However I don't think it is the right way to go. I also don't care for what install.packages() does. Signaling a warning and then an error means someone has to catch both the error and the warning, or suppress the warning, in order to handle the error programmatically. I do care
2012 May 15
1
KEGGSOAP installation error
...le.path(which.lib.loc, package, "data") env <- attachNamespace(ns, pos = pos, dataPath = dataPath, deps)}) 17: library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE) 18: withCallingHandlers(expr, packageStartupMessage = function(c) invokeRestart("muffleMessage")) 19: suppressPackageStartupMessages(library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE)) 20: doTryCatch(return(expr), name, parentenv, handler) 21: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 22: tryCatchList(expr, classes, parentenv, handlers) 23: tryC...
2013 Jun 07
1
cannot load pbdMPI package after compilation
...e))}) 13: try({ ns <- loadNamespace(package, c(which.lib.loc, lib.loc)) env <- attachNamespace(ns, pos = pos, deps)}) 14: library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE) 15: withCallingHandlers(expr, packageStartupMessage = function(c) invokeRestart("muffleMessage")) 16: suppressPackageStartupMessages(library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE)) 17: doTryCatch(return(expr), name, parentenv, handler) 18: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 19: tryCatchList(expr, classes, parentenv, handlers) 20: tryC...
2015 Sep 10
0
Using IDs to suppress specific messages and warnings
...uppressMessages <- function (expr, ids = NULL) > { > withCallingHandlers( > expr, > message = function(c) > { > if(is.null(ids) || (inherits(c, "simpleMessage") && c$id %in% > as.character(ids))) > { > invokeRestart("muffleMessage") > } > } > ) > } > > The hard part is providing IDs for all the existing messages in R and > its packages. It's certainly do-able, but I imagine would take quite > a lot of time. > > Is there any enthusiasm for implementing this feature, or somethi...
2006 May 12
0
New versions for the distr-family of packages, and a new package "startupmsg"
...: to display a NEWS file (if existing) and tags from the DESCRIPTION file of a package +conditions: a new sub-condition to 'message' (with a 'types' slot) is introduced, allowing for scalable startup messages by condition "catchers" muffleMessage() [for StartupMessage], onlytypeMessage(), and custom() additionally: + buildStartupMessage: automatically generates a 'complete' start-up message including *a start-up message of type "version" as to information on the package version *a start-up m...
2006 May 12
0
New versions for the distr-family of packages, and a new package "startupmsg"
...: to display a NEWS file (if existing) and tags from the DESCRIPTION file of a package +conditions: a new sub-condition to 'message' (with a 'types' slot) is introduced, allowing for scalable startup messages by condition "catchers" muffleMessage() [for StartupMessage], onlytypeMessage(), and custom() additionally: + buildStartupMessage: automatically generates a 'complete' start-up message including *a start-up message of type "version" as to information on the package version *a start-up m...
2011 Jan 27
0
Problems installing gputools
...ath <- file.path(which.lib.loc, package, "data") env <- attachNamespace(ns, pos = pos, dataPath = dataPath, deps)}) 9: library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE) 10: withCallingHandlers(expr, packageStartupMessage = function(c) invokeRestart("muffleMessage")) 11: suppressPackageStartupMessages(library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE)) 12: doTryCatch(return(expr), name, parentenv, handler) 13: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 14: tryCatchList(expr, classes, parentenv, handlers) 15: tryCatch...
2012 Feb 06
1
Segfault on ".C" registration via R_CMethodDef according to 'Writing R Extensions'.
...le.path(which.lib.loc, package, "data") env <- attachNamespace(ns, pos = pos, dataPath = dataPath, deps)}) 9: library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE) 10: withCallingHandlers(expr, packageStartupMessage = function(c) invokeRestart("muffleMessage")) 11: suppressPackageStartupMessages(library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE)) 12: doTryCatch(return(expr), name, parentenv, handler) 13: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 14: tryCatchList(expr, classes, parentenv, handlers) 15: tryC...
2018 Jan 02
4
httr::content without message
Hi All: I am using httr to download files form a service, in this case a .csv file. When I use httr::content on the result, I get a message. Since this will be in a package. I want to suppress the message, but haven't figured out how to do so. The following should reproduce the result: myURL <-
2019 Jan 06
4
Failed to install RQuantLib in Ubuntu machine
...if (logical.return) message(paste("Error:", msg), domain = NA) else stop(msg, call. = FALSE, domain = NA)})* * 8: library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE)* * 9: withCallingHandlers(expr, packageStartupMessage = function(c) invokeRestart("muffleMessage"))* *10: suppressPackageStartupMessages(library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE))* *11: doTryCatch(return(expr), name, parentenv, handler)* *12: tryCatchOne(expr, names, parentenv, handlers[[1L]])* *13: tryCatchList(expr, classes, parentenv, handlers)*...
2019 Jan 07
0
Failed to install RQuantLib in Ubuntu machine
...aste("Error:", msg), domain = NA) else stop(msg, call. = FALSE, > domain = NA)})* > > * 8: library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return > = TRUE)* > > * 9: withCallingHandlers(expr, packageStartupMessage = function(c) > invokeRestart("muffleMessage"))* > > *10: suppressPackageStartupMessages(library(pkg_name, lib.loc = lib, > character.only = TRUE, logical.return = TRUE))* > > *11: doTryCatch(return(expr), name, parentenv, handler)* > > *12: tryCatchOne(expr, names, parentenv, handlers[[1L]])* > > *13: tryCatch...
2016 Jan 03
4
R, AIX 64-bit builds - trying to understand root cause for message: "Error: Line starting 'Package: tools ...' is malformed!"
On 2016-01-01 23:48, peter dalgaard wrote: > Nice catch you two!!! > > Happy New Year > -pd I am much happier with this great start! Simon - which compiler)s) did you use: xlc and xlfortran, or gcc/gfortran? I have made some changes to configure(.ac) so maybe my problems are self-inflicted. But would be good to know what environment you are using. Thanks for looking - and
2011 May 23
3
RGL package installation problem on Centos
Dear R users, I have installed the latest version of R from source on Centos (using configure and make install). This seemed to work fine, with no Errors reported and R at the command line starts R. However, if I try and installed the package rgl using; install.packages("rgl") I get the following error; installing to /usr/local/lib64/R/library/rgl/libs ** R ** demo ** inst ** preparing