search for: suppressmessages

Displaying 20 results from an estimated 43 matches for "suppressmessages".

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 (https://stackoverflow.com/questions/...
2023 Feb 19
2
R: determine if `suppressMessages()` has been invoked
Awesome, this gets the job done. To answer your question: When using C or C++ via Rinside or within a package, those functions do not listen to suppressMessages, e.g. `Rprintf` keeps printing to the console. Since it's common to use wrapper functions in R anyway, they can run `are_messages_suppressed` and pass the information on to an explicit `verbose` argument of the C / C++ function. ----- Original Mail ----- Von: "Ivan Krylov" <krylo...
2015 Sep 10
2
Using IDs to suppress specific messages and warnings
The suppressMessages and suppressWarnings functions currently suppress all the message or warnings that are generated by the input expression. The ability to suppress only specific messages or warnings is sometimes useful, particularly for cases like file import where there are lots of things that can go wrong. Suppr...
2011 Dec 05
1
RcppArmadillo compilation error: R CMD SHLIB returns status 1
Dear all, running the example by D. Eddebuettel (http://dirk.eddelbuettel.com/blog/2011/04/23/) I get an error message. Specifically, the R code I was taking from the above example is ### BEGIN EXAMPLE ### suppressMessages(require(RcppArmadillo)) suppressMessages(require(Rcpp)) suppressMessages(require(inline)) code <- ' arma::mat coeff = Rcpp::as<arma::mat>(a); arma::mat errors = Rcpp::as<arma::mat>(e); int m = errors.n_rows; int n = errors.n_cols; arma::mat simdata(m,n); simdata.ro...
2017 Sep 14
1
Print All Warnings that Occurr in All Parallel Nodes
...------------------------------------------- # update.packages("RODBC") # update.packages("tidyverse") ## ----------------------------------------------------------------------------- ## Libraries ## ----------------------------------------------------------------------------- suppressMessages(require(RODBC)) suppressMessages(require(tidyverse)) suppressMessages(require(parallel)) ## ----------------------------------------------------------------------------- ## CMD: Command for DISPOIN's Directory Acquisition ## ---------------------------------------------------------------------...
2012 Mar 09
2
How do I force confint() for glm() to be quiet?
I need confint() for glm() to supress the messages "Waiting for profiling to be done..." because they mess up the caching mechanism of pgfSweave (see https://github.com/cameronbracken/pgfSweave/issues/40). I have read the help page of confint(), but I do not know how to get the help page for the glm() version, if any such help page exists. Is there a general way of turning of output
2012 Jan 31
0
Error in linearHypothesis.mlm: The error SSP matrix is apparently of deficient rank
...ay Repeated-measure ANOVA with my data. I have read the "Anova in car: SSPE apparently deficient rank" thread by I'm not sure the within-subject interaction has more degrees of freedom than subjects in my case. I have prepared the following testing script: rm(list = ls()) suppressMessages(require("plyr")) suppressMessages(require(ez)) source.file <- file.path(path.expand("~"), "test-data.csv") data <- read.csv(source.file, stringsAsFactors = TRUE) data$Participant <- as.factor(data$Participant) summary(data)...
2015 Sep 10
0
Using IDs to suppress specific messages and warnings
...uld be used for this sort of thing. That is already how tryCatch and withCallingHandlers discriminate the conditions to handle. Designing and implementing a condition class hierarchy to support this is indeed the hard/tedious part. Best, luke On Thu, 10 Sep 2015, Richard Cotton wrote: > The suppressMessages and suppressWarnings functions currently suppress > all the message or warnings that are generated by the input > expression. > > The ability to suppress only specific messages or warnings is > sometimes useful, particularly for cases like file import where there > are lots of thi...
2012 Mar 15
2
ggplot2: goem_smooth and suppress messages
...+ geom_smooth(span=0.2,se=FALSE,size=0.7) The messages look like this: geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method. There were 15 warnings (use warnings() to see them) I have tried p <- p + suppressMessages(geom_smooth(span=0.2,se=FALSE,size=0.7)) but this does not work. I would like to keep using method="auto" but without any messages. Any ideas on how to suppress the messages when using geom_smooth? Thank you! -- View this message in context: http://r.789695.n4.nabble.com/ggplot2-goem-s...
2012 Jan 11
1
Silently loading and Depends: versus NAMESPACE imports
R CMD check really hates it when my .onLoad() function contains suppressMessages(library(foo)) However, _and for non-public packages not going to CRAN_ I prefer doing this over using explicit Depends or import statements in the NAMESPACE file as the latter do not give me an ability to make the loading less verbose. With the R universe of packages being as vast as at is, a sim...
2009 May 10
2
In C, a fast way to slice a vector?
Hello, Suppose in the following code, PROTECT(sr = R_tryEval( .... )) sr is a RAWSXP vector. I wish to return another RAWSXP starting at position 13 onwards (base=0). I could create another RAWSXP of the correct length and then memcpy the required bytes and length to this new one. However is there a more efficient method? Regards Saptarshi Guha
2011 Oct 05
3
suppressing stderr output from system() calls
Dear list, I'm trying to suppress/redirect/squash the output from commands like install.packages, or download.file. The problem is that none of: sink(..., type="message"), sink(..., type="output"), capture.output, suppressMessages are quite doing the trick. Output gets written to the stderr stream, despite any combination of the above suppression commands. According to ?sink: Messages sent to ‘stderr()’ (including those from ‘message’, ‘warning’ and ‘stop’) can be diverted by ‘sink(type = "message")’ (see below)....
2016 Jul 04
2
cat() in proc.time?
...ff25cca379687b86933d730/src/library/base/R/time.R#L31 on.exit(cat("Timing stopped at:", ppt(proc.time() - time), "\n")) This means that as far as I can tell the general way to make sure there is no output from a timed statement is ... tt1 <- capture.output(tt0 <- suppressMessages(suppressWarnings( try(<stuff to try>, silent=TRUE)))) (I know I could/should be using tryCatch() instead of try(), but I don't think it really matters here ... ?) What would people think of a request to change this to message() rather than cat() in...
2008 Jan 11
1
How to disable output messages (prints or cats) from functions in R?
...lot of numbers depending on the input. This is very annoying because I have to run that function several times and I don't want to show this information. What I want is to disable that display but I don't know how to do it. I've tried it with suppressWarnings ( function (...) ) and suppressMessages ( function (...) ) but It doesn't work, the function() continues printing that information. I tried invisible () too. Furthermore, this function doesn't have a "verbose" parameter. Thus, I can't disable it using a verbose parameter. I'm sure that there must be some pro...
2010 Dec 16
1
Is there a join() function in R ? OR: simulating "Combining ggplot2 and Google Maps" by David Kahle
...the data and the code and want to learn how to do this by first simulating David's results and then working it through line by line to make sure I understand what every line of code does and then applying it to my own data. When I run the code however, it breaks on the following line: df <- suppressMessages(join(df_xyll, m_map, type = 'right')) I do not seem to have the join() function. This looks almost SQLish. I have tried ??join and looking on CRAN and a google search but I cannot find this function. Is there a special library that one has to install for this to work? Can anyone help pleas...
2018 Jul 12
1
Top level \Sexpr and R CMD check
...============================================================= --- src/library/tools/R/QC.R (revision 74954) +++ src/library/tools/R/QC.R (working copy) @@ -6430,7 +6430,8 @@ if(basename(f) %in% c("iconv.Rd", "showNonASCII.Rd")) def_enc <- TRUE tmp <- tryCatch(suppressMessages(checkRd(f, encoding = enc, def_enc = def_enc, - macros = macros)), + macros = macros, + stages = c("build", "install", "...
2016 Jul 17
1
cat() in system.time() ?
...; > > on.exit(cat("Timing stopped at:", ppt(proc.time() - time), "\n")) > > > This means that as far as I can tell the general way to make sure > > there is no output from a timed statement is ... > > > tt1 <- capture.output(tt0 <- suppressMessages(suppressWarnings( > > try(<stuff to try>, silent=TRUE)))) > > > (I know I could/should be using tryCatch() instead of try(), but I don't > > think it really matters here ... ?) > > > What would people think of a request to change this to messa...
2011 Oct 11
1
R CMD INSTALL writes to stderr
...stderr? If it wrote to stdout, then we could capture its output within an R session when calling sink("stdout.txt", type="output") install.packages("MASS", type="source") sink() As it stands, the stderr messages can't be captured via sink/capture.output/suppressMessages within an R session. Interestingly, the make output goes to stdout, but the R messages go to stderr: # the 'make' output goes to stdout $ R --vanilla CMD INSTALL -l /tmp MASS_7.3-14.tar.gz 2>/dev/null gcc-4.2 -arch i386 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/L...
2023 Aug 06
3
A demonstrated shortcoming of the R package management system
...install.packages('SeuratObject') ## we now remove the Matrix package version 1.5.1 we installed into /usr/local leaving 1.6.0 remove.packages("Matrix") packageVersion("Matrix") ## and we now run a bit of SeuratObject code that is now broken as Csparse_validate is gone suppressMessages(library(SeuratObject)) data('pbmc_small') graph <- pbmc_small[['RNA_snn']] class(graph) getClass('Graph') show(graph) # this fails -- dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
2007 Jan 30
3
silent loading of packages
I would like to turn off all the messages during library(aPackage) or require(aPackage) I tried different commands: invisible, capture.output, sink but none of them is working. For example, loading VGAM, gives a lot of unnecessary messages: > library(VGAM) Attaching package: 'VGAM' The following object(s) are masked from package:splines : bs The