similar to: require(..., quietly=TRUE) does not suppress warning

Displaying 20 results from an estimated 5000 matches similar to: "require(..., quietly=TRUE) does not suppress warning"

2016 Dec 08
1
require(..., quietly=TRUE) does not suppress warning
Well, I'm getting a warning (not an error) when the package doesn't exist. I interpreted "most often" to mean that suppressing warnings/errors is why you'd most often use this argument, as most packages don't emit startup messages. And technically there isn't a problem with attaching the package, since we don't even try to attach packages that don't exist.
2016 Dec 08
0
require(..., quietly=TRUE) does not suppress warning
Well, it says "most often" no errors/warnings are given, so it is not contradicting the docs! It looks like the person/team that coded require( ) decided you should get an error when the package doesn't exist. If you want a silent loading, consider aaa <- try( library(foo,verbose=FALSE,quietly=TRUE),silent=TRUE) and then check to see if aaa is of class
2011 Oct 06
2
Titles changing when a plot is redrawn
I ran into a problem with titles on graphs. I wanted a graph with multiple subplots, with each having a title that involved both a Greek letter and an identifier for each graph. Below is a simplified version of code to do this. The graph appears fine, with the first graph having "i=1" in the title, and the second graph having "i=2" in the title. However, when I resize the
2012 Jun 24
2
Win 64 package build - ERROR: loading failed for 'x64'
I have developed an R package that works under Win32, but when I attempt to build it on Win64, I get ERROR: loading failed for 'x64' More precisely, I developed and tested the package under Win32 and it works. But when I move to a 64 bit Windows 7 (Home Premium) system, and attempt to build both 32 bit and 64 bit packages, the 32 bit package seems to build, but the 64 bit build
2018 Mar 23
1
Integrate erros on certain functions
In the help for ?integrate: >When integrating over infinite intervals do so explicitly, rather than just using a large number as the endpoint. This increases the chance of a correct answer ? any function whose integral over an infinite interval is finite must be near zero for most of that interval. I understand that and there are examples such as: ## a slowly-convergent integral integrand
2008 Jun 06
1
calling a C function with a struct
I am trying to call a precompiled C function that uses a struct as one of it's arguments. I could write a wrapper function in C, but I was hoping there is some way to pack fields into an array of type raw that could be passed directly to the function. Here is some more detail. The C struct is simple, but has mixed types: struct STRUCT1 { long type; long nx; double
2010 Jun 17
2
constrOptim( ): conflict between help page and code
There is a contradiction between what the help page says and what constrOptim actually does with the constraints. The issue is what happens on the boundary. The help page says The feasible region is defined by ?ui %*% theta - ci >= 0?, but the R code for constrOptim reads if (any(ui %*% theta - ci <= 0)) stop("initial value not feasible") The following example
2010 Dec 06
3
0.5 != integrate(dnorm,0,20000) = 0
Hello: The example "integrate(dnorm,0,20000)" says it "fails on many systems". I just got 0 from it, when I should have gotten either an error or something close to 0.5. I got this with R 2.12.0 under both Windows Vista_x64 and Linux (Fedora 13); see the results from Windows below. I thought you might want to know. Thanks for all your work in creating
2009 Sep 29
1
Probability of data values form empirical distribution
Hello,   Could someone help me please and to tell how to get the probability from empirical distribution (not parametric) for each data value (R function). For example, for normal distribution there is such a function like:   “pnorm(q, mean = 0, sd = 1, lower.tail = TRUE, log.p = FALSE)”   I need the same function only for the empirical distribution (which does not correspond to any typical
2009 Sep 29
1
Probability of data values form empirical distribution
Hello,   Could someone help me please and to tell how to get the probability from empirical distribution (not parametric) for each data value (R function). For example, for normal distribution there is such a function like:   “pnorm(q, mean = 0, sd = 1, lower.tail = TRUE, log.p = FALSE)”   I need the same function only for the empirical distribution (which does not correspond to any typical
2016 Dec 08
3
wish list: generalized apply
Dear All, I regularly want to "apply" some function to an array in a way that the arguments to the user function depend on the index on which the apply is working. A simple example is: A <- array( runif(160), dim=c(5,4,8) ) x <- matrix( runif(32), nrow=4, ncol=8 ) b <- runif(8) f1 <- function( A, x, b ) { sum( A %*% x ) + b } result <- rep(0.0,8) for (i in 1:8) {
2015 Jan 08
4
RFC: getifexists() {was [Bug 16065] "exists" ...}
If we do add an argument to get(), then it should be named consistently with the ifnotfound argument of mget(). As mentioned, the possibility of a NULL value is problematic. One solution is a sentinel value that indicates an unbound value (like R_UnboundValue). But another idea (and one pretty similar to John's) is to follow the SYMSXP design at the C level, where there is a structure that
2009 Feb 15
1
sources of code; was Generate random numbers in Fortran
Ben Bolker gives some reasons why Numerical Recipes may be problematic as a starting point for R codes. CUP did a masterful job of marketing, but the license is restrictive as the links he gives points out. In some tests, I've also noted that some of the algorithms are less than stellar e.g, convergence tests in one or two optimization routines. Should we have a wiki item to help people find
2014 May 07
3
historical significance of Pr(>Chisq) < 2.2e-16
Where does the value 2.2e-16 come from in p-values for chisq tests such as those reported below? > Anova(cm.mod2) Analysis of Deviance Table (Type II tests) Response: Freq LR Chisq Df Pr(>Chisq) B 11026.2 1 < 2.2e-16 *** W 7037.5 1 < 2.2e-16 *** Age 886.6 8 < 2.2e-16 *** B:W 3025.2 1 < 2.2e-16 *** B:Age 1130.4 8 < 2.2e-16 *** W:Age 332.9 8 < 2.2e-16 *** --- Signif.
2015 Jan 07
2
gsub with perl=TRUE results in 'this version of PCRE is not compiled with Unicode property support' in R-devel
The following code: res <- gsub("(*UCP)\\b(i)\\b", "", "nhgrimelanomaclass", perl = TRUE) results in: Error in gsub(sprintf("(*UCP)\\b(%s)\\b", "i"), "", "nhgrimelanomaclass", : invalid regular expression '(*UCP)\b(i)\b' In addition: Warning message: In gsub(sprintf("(*UCP)\\b(%s)\\b",
2015 Apr 29
4
R CMD check and missing imports from base packages
On Wed, Apr 29, 2015 at 1:45 PM, Gabriel Becker <gmbecker at ucdavis.edu> wrote: > Gabor, > > To play devil's advocate a bit, why not just have the package formally > import the functions it wants to use (or the whole package if that is > easier)? > This is exactly my goal. And to facilitate this, R CMD check could remind you if you forgot to do the formal import.
2015 Jan 08
5
RFC: getifexists() {was [Bug 16065] "exists" ...}
In November, we had a "bug repository conversation" with Peter Hagerty and myself: https://bugs.r-project.org/bugzilla/show_bug.cgi?id=16065 where the bug report title started with --->> "exists" is a bottleneck for dispatch and package loading, ... Peter proposed an extra simplified and henc faster version of exists(), and I commented > --- Comment #2
2015 Jan 13
2
R CMD build looking for texi2dvi in the wrong place (R-devel)
R CMD build fails with recent R-devel because it is looking for texi2dvi in /usr/local/bin, but on this system, MacTex has installed it in /usr/bin. $ R CMD build IRanges * checking for file 'IRanges/DESCRIPTION' ... OK * preparing 'IRanges': * checking DESCRIPTION meta-information ... OK * cleaning src * installing the package to build vignettes * creating vignettes ... ERROR
2009 Jun 12
1
Can't get F77_CALL(dgemm) to work [SEC=UNCLASSIFIED]
Hi I am new to writing C code and am trying to write an R extension in C. I have hit a wall with F77_CALL(dgemm) in that it produces wrong results. The code below is a simplified example that multiplies the matrices Ab and Bm to give Cm. The results below show clearly that Cm is wrong. Am= 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Bm= 1 1 1 1 1
2005 Aug 30
2
problem in generating positive stable random numbers
Dear all, I am trying to use the rstable(n, alpha, beta, gamma = 1, delta = 0, pm = c(0, 1, 2))) function to generate positive stable random numbers. For positive stable distribution, beta==1 and alpha is in (0,1), which defines random variables with support (0, infinity). So, I used rstable(100, 0.5, 1) for an example. I found that this gives me some negative numbers. For example, >