similar to: Bug in as.Date or strptime?

Displaying 20 results from an estimated 3000 matches similar to: "Bug in as.Date or strptime?"

2020 Nov 01
0
strptime() keeps emitting warnings after establishing a handler with tryCatch()
Hello, I cannot reproduce this behavior and, as documented, the posted code doesn't issue warnings due to a wrong timezone but I'm running sessionInfo() R version 4.0.3 (2020-10-10) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.1 LTS Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0 LAPACK:
2020 Oct 31
2
strptime() keeps emitting warnings after establishing a handler with tryCatch()
Dear list members, I have come about a peculiar behavior in R (4.0.2) which I would describe as a bug. On macOS, where `strptime()` raises a warning for invalid timezone identifiers, the following code will continue to raise the original warning with every subsequent call to `strptime()`: ``` # attach a handler for warnings for this call only: tryCatch(strptime('2020-10-31 18:30', format
2019 Jun 21
4
Calculation of e^{z^2/2} for a normal deviate z
Hello, Well, try it: p <- .Machine$double.eps^seq(0.5, 1, by = 0.05) z <- qnorm(p/2) pnorm(z) # [1] 7.450581e-09 1.228888e-09 2.026908e-10 3.343152e-11 5.514145e-12 # [6] 9.094947e-13 1.500107e-13 2.474254e-14 4.080996e-15 6.731134e-16 #[11] 1.110223e-16 p/2 # [1] 7.450581e-09 1.228888e-09 2.026908e-10 3.343152e-11 5.514145e-12 # [6] 9.094947e-13 1.500107e-13 2.474254e-14 4.080996e-15
2020 Aug 10
1
Typos in file.path documentation.
Hello, R 4.0.2 on Ubuntu 20.04, sessionInfo() below. I believe there are two typos in ?file.path, section Value, 2nd paragraph. 1. There is a close parenthesis missing after Encoding, as it is reading is a bit confusing, I had to backtrack and repeat. 2. I'm not a native language speaker but before a consonant it's 'a', not 'an', right? an component should be a
2019 Jun 21
4
Calculation of e^{z^2/2} for a normal deviate z
You may want to look into using the log option to qnorm e.g., in round figures: > log(1e-300) [1] -690.7755 > qnorm(-691, log=TRUE) [1] -37.05315 > exp(37^2/2) [1] 1.881797e+297 > exp(-37^2/2) [1] 5.314068e-298 Notice that floating point representation cuts out at 1e+/-308 or so. If you want to go outside that range, you may need explicit manipulation of the log values. qnorm()
2018 Jul 16
2
Memory leakage from large lists
Hello, I am experiencing a very noticeable memory leak when using large lists of large data. The code below creates a list of matrices, yet the memory does not free up after removing that item and performing a garbage collection. Is there a something I can do to prevent this memory leak? Any help would be greatly appreciated. By the way, if you execute the code, please run it in a new R session.
2019 Feb 01
3
nlminb with constraints failing on some platforms
Hello, R 3.5.2 on ubuntu 18.04. sessionInfo() at the end. Works with me, same results, cannot reproduce the error. f <- function(x) sum( log(diff(x)^2+.01) + (x[1]-1)^2 ) opt <- nlminb(rep(0, 10), f, lower=-1, upper=3) str(opt) xhat <- rep(1, 10) all.equal(opt$par, xhat, tol=0) # good: 5.53 e-7 #[1] "Mean relative difference: 5.534757e-07" all.equal(opt$objective,
2019 Jun 23
2
Calculation of e^{z^2/2} for a normal deviate z
I agree with many the sentiments about the wisdom of computing very small p-values (although the example below may win some kind of a prize: I've seen people talking about p-values of the order of 10^(-2000), but never 10^(-(10^8)) !). That said, there are a several tricks for getting more reasonable sums of very small probabilities. The first is to scale the p-values by dividing the
2019 Jul 15
4
Possible bug in `class<-` when a class-specific '[[.' method is defined
Hello, Clean R 3.6.1 session on Ubuntu 19.04, RStudio 1.1.453. sessionInfo() at the end. I can reproduce this. counttt <- 0 `[[.MYCLASS` = function(x, ...) { counttt <<- counttt + 1 # browser() x = NextMethod() return(x) } df <- as.data.frame(matrix(1:20, nrow=5)) class(df) <- c("MYCLASS","data.frame") counttt #[1] 9 But there's more. I
2018 Jul 08
2
consider running tools::compactPDF(gs_quality = "ebook")
Dear all, I run R CMD build --compact-vignettes="both" gRbase and/or R CMD build --compact-vignettes="gs+qpdf" gRbase and in the log from r-devel (on winbuilder) I get * checking sizes of PDF files under 'inst/doc' ... WARNING 'gs+qpdf' made some significant size reductions: compacted 'gRbase-arrays.pdf' from 421Kb to 115Kb consider
2018 Jul 08
2
consider running tools::compactPDF(gs_quality = "ebook")
Dear all, I run R CMD build --compact-vignettes="both" gRbase and/or R CMD build --compact-vignettes="gs+qpdf" gRbase and in the log from r-devel (on winbuilder) I get * checking sizes of PDF files under 'inst/doc' ... WARNING 'gs+qpdf' made some significant size reductions: compacted 'gRbase-arrays.pdf' from 421Kb to 115Kb consider
2005 Oct 31
2
Sweave (R?) font encoding problems
Dear R list, I'm having some problems with font encodings when using R+Sweave+Latex in my native language: Portuguese. My environment: Kubuntu 5.10 Linux $> uname -a Linux nassa 2.6.12-9-686 #1 Mon Oct 10 13:25:32 BST 2005 i686 GNU/Linux R> R.version _ platform i486-pc-linux-gnu arch i486 os linux-gnu system i486, linux-gnu
2019 Jun 24
2
Calculation of e^{z^2/2} for a normal deviate z
>>>>> William Dunlap via R-devel >>>>> on Sun, 23 Jun 2019 10:34:47 -0700 writes: >>>>> William Dunlap via R-devel >>>>> on Sun, 23 Jun 2019 10:34:47 -0700 writes: > include/Rmath.h declares a set of 'logspace' functions for use at the C > level. I don't think there are core R functions that call
2018 Jul 08
2
[R] consider running tools::compactPDF(gs_quality = "ebook")
Dear all, I run R CMD build --compact-vignettes="both" gRbase and/or R CMD build --compact-vignettes="gs+qpdf" gRbase and in the log from r-devel (on winbuilder) I get * checking sizes of PDF files under 'inst/doc' ... WARNING 'gs+qpdf' made some significant size reductions: compacted 'gRbase-arrays.pdf' from 421Kb to 115Kb consider
2012 Feb 28
3
workflow using git for translations
I did a first set of minor translations to become familiar with the process. These changes have been committed in "main" wine git (how do you call it?). In the meanwhile, I did a bunch of changes. Now I want to create a patch for these changes. I did a > git stash save (and I had a copy of the file somewhere else) and then a > git pull Auto-merging po/pt_PT.po CONFLICT
2018 May 09
3
NAs produced by integer overflow, but only some time ...
I have problem with integer overflow that I cannot understand. I have a character vector curr.lemmas with the following properties: length(curr.lemmas) # 61224 length(unique(curr.lemmas)) # 2652 That vector is the input to the following function: yules.k1 <- function(input) { m1 <- length(input); temp <- table(table(input)) m2 <- sum("*"(temp,
2018 Jul 17
0
Memory leakage from large lists
This looks like a case of FAQ 7.42: https://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-is-R-apparently-not-releasing-memory_003f On Mon, Jul 16, 2018 at 2:32 PM, Daniel Raduta <datudar at gmail.com> wrote: > Hello, > > I am experiencing a very noticeable memory leak when using large lists of > large data. The code below creates a list of matrices, yet the memory does > not
2020 Sep 09
1
more Matrix weirdness
Am I being too optimistic in expecting this (mixing and matching matrices and Matrices) to work? If x is a matrix and m is a Matrix, replacing a commensurately sized sub-matrix of x with m throws "number of items to replace is not a multiple of replacement length" ... x <- matrix(0,nrow=3,ncol=10, dimnames=list(letters[1:3],LETTERS[1:10])) rr <-
2018 May 09
0
NAs produced by integer overflow, but only some time ...
a) Numeric values may be either integers (signed 32 bit) or double precision (53 bit mantissa). b) Double precision constants are numeric with no decoration (e.g. 61224). Integer constants have an L (e.g. 61224L). c) 61224*61224 > 2^31-1 so that answer cannot fit into an integer. d) Exponentiation is a floating point operation so the result of 61224L^2L is a floating point answer that CAN
2019 Feb 28
2
Exit status of Rscript
Current R release (3.5.2) and devel return a 0 exit status on error, while prior versions returned a non-zero exit status. On Linux and MacOs, the following line returns TRUE for R-3.5.2 and R-devel, and FALSE for R-3.5.1 and R-3.5.0: system2("Rscript", c("-e", shQuote("stop('foo')"))) == 0 I didn't find this in the NEWS, so I believe this is a bug.