similar to: more Matrix weirdness

Displaying 20 results from an estimated 3000 matches similar to: "more Matrix weirdness"

2020 Sep 09
3
more Matrix weirdness
I think that this is because `[<-` dispatches on S4 methods only if the first argument is S4. ?"[<-" says: "These operators are also implicit S4 generics, but as primitives, S4 methods will be dispatched only on S4 objects ?x?." Georgi Boshnakov -----Original Message----- Message: 19 Date: Tue, 8 Sep 2020 22:04:44 -0400 From: Ben Bolker <bbolker at
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
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
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 Sep 23
3
jitter-bug? problematic behaviour of the jitter function
Dear all, i have noticed some strange behaviour in the ?jitter? function in R. On the help page for jitter it is stated that "The result, say r, is r <- x + runif(n, -a, a) where n <- length(x) and a is the amount argument (if specified).? and "If amount is NULL (default), we set a <- factor * d/5 where d is the smallest difference between adjacent unique (apart from fuzz) x
2020 Sep 23
3
jitter-bug? problematic behaviour of the jitter function
Dear all, i have noticed some strange behaviour in the ?jitter? function in R. On the help page for jitter it is stated that "The result, say r, is r <- x + runif(n, -a, a) where n <- length(x) and a is the amount argument (if specified).? and "If amount is NULL (default), we set a <- factor * d/5 where d is the smallest difference between adjacent unique (apart from fuzz) x
2020 Sep 10
0
more Matrix weirdness
>>>>> Georgi Boshnakov >>>>> on Wed, 9 Sep 2020 10:48:56 +0000 writes: > I think that this is because `[<-` dispatches on S4 > methods only if the first argument is S4. ?"[<-" says: > "These operators are also implicit S4 generics, but as > primitives, S4 methods will be dispatched only on S4 > objects
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
2019 Jul 07
3
Possible bug in `class<-` when a class-specific '[[.' method is defined
Hi all ! I noticed a strange behaviour of the function `class<-` when a class-specific '[[.' method is defined. Here below a reproducible example : #-------------------------------------------------------------------. counttt <- 0 `[[.MYCLASS` = function(x, ...) { counttt <<- counttt + 1 # browser() x = NextMethod() return(x) } df <- as.data.frame(matrix(1:20,
2020 Sep 23
0
[R] jitter-bug? problematic behaviour of the jitter function
Hello, R 4.0.2 on Ubuntu 20.04, sessionInfo at end. This came up in r-help, I'm answering to the OP and also posting to r-devel since I believe it is more appropriate there. I can confirm this. The original instructions are the first and the last, but even with smaller numbers the error shows up. set.seed(2020) jitter(c(1,2,10^4)) # desired behaviour #[1] 1.058761 1.957690
2012 Feb 23
1
[PATCH] Support 56kHz to 19.2kHz gain analysis (Patch v4)
This implementation uses decimation to generate an estimate of the required ReplayGain adjustment for tracks sampled at high rates. This approach avoids having to generate filters with commensurately more taps, and also the subsequent effect on performance as these additional taps are evaluated for high sample rate tracks. Filter table entries with coefficients that are unchanged are marked /*
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
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()
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
2018 Jun 22
1
Bug in as.Date or strptime?
Hello, This just came up in SO, sessionInfo() at the end. https://stackoverflow.com/questions/50988018/seeking-explanation-for-as-date-function-in-r?noredirect=1#comment88971055_50988018 # example 1 # not even the month is right as.Date(x = 1, format = '%j', origin= '2015-01-01') #[1] "2018-07-21" # example 2a # nonsense output as.Date(x = 1, origin=
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.
2019 May 30
2
use of buffers in sprintf and snprintf
Hi again, I realised it is useful to replicate the warnings locally without relying on CRAN automatic check; instead of R(-devel) CMD check --as-cran package_version.tar.gz one can use R CMD check --configure-args="" and in my case the WARNINGS were initially given with https://www.stats.ox.ac.uk/pub/bdr/gcc9/README.txt and those specification might as well used in --configure-args
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
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