[R] MASS::mvrnorm() on MKL may produce different numbers even when the seed is the same?

2023-08-16 Thread Shu Fai Cheung
Hi All, When addressing an error in one of my packages in the CRAN check at CRAN, I found something strange which, I believe, is unrelated to my package. I am not sure whether it is a bug or a known issue. Therefore, I would like to have advice from experts here. The error at CRAN check occurred

Re: [R] X11 font

2023-08-16 Thread Ben Bolker
There's an ancient related question ... maybe it helps? https://stat.ethz.ch/pipermail/r-help//2016-October/442326.html sudo apt-get install xfonts-100dpi sudo-apt-get install xfonts-75dpi apt-cache search xfonts doesn't pull up anything else obvious (presumably you already have xfonts-base

[R] X11 font

2023-08-16 Thread Therneau, Terry M., Ph.D. via R-help
I get the following error out of R, on a newer Ubuntu installation. Error in `axis()`: ! X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 1 at size 12 could not be loaded Backtrace:  1. graphics::matplot(...)  3. graphics::plot.default(...)  4. graphics (local) localAxis(...)  6.

Re: [ESS] ESS code-folding?

2023-08-16 Thread Sparapani, Rodney via ESS-help
Hi Karlo: This is very interesting. But, I must not be doing it right. Do you have a simple example of how to use this to do case-folding? Thanks -- Rodney Sparapani, Associate Professor of Biostatistics, He/Him/His Vice President, Wisconsin Chapter of the American Statistical Association

Re: [ESS] ESS code-folding?

2023-08-16 Thread Karlo Guidoni Martins via ESS-help
hi! this works fine for me: ;;; BEG ;;; outline-(minor)-mode (setq outline-minor-mode-highlight 'override) ; emacs28 (setq outline-minor-mode-cycle t) ;;; outline for ess-mode (add-hook 'ess-mode-hook #'(lambda () (outline-minor-mode) (setq-local

Re: [R] Numerical stability of: 1/(1 - cos(x)) - 2/x^2

2023-08-16 Thread Leonard Mada via R-help
Dear Iris, Dear Martin, Thank you very much for your replies. I add a few comments. 1.) Correct formula The formula in the Subject Title was correct. A small glitch swept into the last formula: - 1/(cos(x) - 1) - 2/x^2 or 1/(1 - cos(x)) - 2/x^2 # as in the subject title; 2.) log1p Actually,

[ESS] ESS code-folding?

2023-08-16 Thread Sparapani, Rodney via ESS-help
Hi Gang: One of my student�s asked this question. Any resources/knowledge on code folding? in RStudio �� creates a collapsible section. Came across

Re: [ESS] New Emacs Modified distributions - now double the pleasure!

2023-08-16 Thread Martin Maechler via ESS-help
> Vincent Goulet via ESS-help > on Tue, 15 Aug 2023 16:24:42 + writes: > Hi folks, > Back in April 2022 [*], I asked here if there was still interest in my distributions of Emacs that ship with ESS and AUCTeX ready to go. Since the response was generally positive, and

Re: [R] R - Problem retrieving memory used after gc() using arrow library

2023-08-16 Thread Ivan Krylov
On Wed, 16 Aug 2023 11:22:00 +0200 Kévin Pemonon wrote: > I'd like to understand why there's a difference in memory used > between the Windows task manager and R's memory.size(max=F) function. When R was initially ported to Windows, then-popular version of the system memory allocator was not a

[R] R - Problem retrieving memory used after gc() using arrow library

2023-08-16 Thread Kévin Pemonon
Hello, I'm using R versions 4.1.3 on Windows 10 and I'm having a problem with memory usage. Currently, I need to use the arrow and dplyr libraries in a program and when I compare the memory used between the windows task manager and the memory.size(max=F) function, the one given by the windows

Re: [R] Numerical stability of: 1/(1 - cos(x)) - 2/x^2

2023-08-16 Thread Martin Maechler
> Iris Simmons > on Wed, 16 Aug 2023 02:57:48 -0400 writes: > You might also be able to rewrite > log(1 - cos(x)) > as > log1p(-cos(x)) > On Wed, Aug 16, 2023, 02:51 Iris Simmons wrote: >> You could rewrite >> >> 1 - cos(x) >> >> as

Re: [R] Numerical stability of: 1/(1 - cos(x)) - 2/x^2

2023-08-16 Thread Iris Simmons
You might also be able to rewrite log(1 - cos(x)) as log1p(-cos(x)) On Wed, Aug 16, 2023, 02:51 Iris Simmons wrote: > You could rewrite > > 1 - cos(x) > > as > > 2 * sin(x/2)^2 > > and that might give you more precision? > > On Wed, Aug 16, 2023, 01:50 Leonard Mada via R-help > wrote: > >>

Re: [R] Numerical stability of: 1/(1 - cos(x)) - 2/x^2

2023-08-16 Thread Iris Simmons
You could rewrite 1 - cos(x) as 2 * sin(x/2)^2 and that might give you more precision? On Wed, Aug 16, 2023, 01:50 Leonard Mada via R-help wrote: > Dear R-Users, > > I tried to compute the following limit: > x = 1E-3; > (-log(1 - cos(x)) - 1/(cos(x)-1)) / 2 - 1/(x^2) + log(x) > # 0.4299226