Re: [R] Bug in R-Help Archives?

2023-01-26 Thread Jeff Newmiller
Every email thread (mailing list or not) gets a hidden identifier that is used to identify that thread. It is not that Outlook outsmarted John... any email program would have done the same. John... please don't reply to existing posts with a new subject... many mailing list users may be using

Re: [R] Bug in R-Help Archives?

2023-01-26 Thread Ivan Krylov
On Fri, 27 Jan 2023 13:01:39 +0530 Deepayan Sarkar wrote: > From looking at the headers in John Sorkin's mail, my guess is that he > just replied to the other thread rather than starting a fresh email, > and in his attempts to hide that, was outsmarted by Outlook. That's 100% correct. The

Re: [R] Bug in R-Help Archives?

2023-01-26 Thread Deepayan Sarkar
>From looking at the headers in John Sorkin's mail, my guess is that he just replied to the other thread rather than starting a fresh email, and in his attempts to hide that, was outsmarted by Outlook. This is based on references to domains such as yahoo.com, dcn.davis.ca.us, and precheza.cz in

Re: [R] Bug in R-Help Archives?

2023-01-26 Thread Rui Barradas
Às 06:39 de 27/01/2023, Rui Barradas escreveu: Hello, When consulting the R-Help Archives today I've noticed that the thread Pipe operator started by John Sorkin, Tue Jan 3 17:48:30 CET 2023 is under another thread, R Certification started by Mukesh Ghanshyamdas Lekhrajani. Isn't this a

[R] Bug in R-Help Archives?

2023-01-26 Thread Rui Barradas
Hello, When consulting the R-Help Archives today I've noticed that the thread Pipe operator started by John Sorkin, Tue Jan 3 17:48:30 CET 2023 is under another thread, R Certification started by Mukesh Ghanshyamdas Lekhrajani. Isn't this a bug in the filing system? Thanks to the list

Re: [R] implicit loop for nested list

2023-01-26 Thread Andrew Simmons
I would use replicate() to do an operation with random numbers repeatedly: ``` mysim <- replicate(10, { two.mat <- matrix(rnorm(4), 2, 2) four.mat <- matrix(rnorm(16), 4, 4) list(two.mat = two.mat, four.mat = four.mat) }) ``` which should give you a matrix-list. You can slice this

Re: [R] implicit loop for nested list

2023-01-26 Thread Jeff Newmiller
Elegance is in the eyes of the beholder... extractor <- function( simlist, sim_name ) { do.call( cbind , lapply( simlist , function( r ) r[[ sim_name ]] ) ) } extractor( mysim, "two.mat" ) ... but using do.call will be much more memory efficient than successive cbind

Re: [R] implicit loop for nested list

2023-01-26 Thread Bert Gunter
Is this what you want: ## This cbinds all the 2 matrix components of mysim ## producing a 2 x 20 matrix do.call(cbind,lapply(mysim,`[[`,1)) ## Change the 1 to a 2 to cbind the other components. Cheers, Bert Tha On Thu, Jan 26, 2023 at 7:33 PM Naresh Gurbuxani < naresh_gurbux...@hotmail.com>

[R] implicit loop for nested list

2023-01-26 Thread Naresh Gurbuxani
> > I am looking for a more elegant way to write below code. > > #Simulation results have different dimensions > mysim <- lapply(1:10, function(y) { >two.mat <- matrix(rnorm(4), nrow = 2) >four.mat <- matrix(rnorm(16), nrow = 4) >list(two.mat = two.mat, four.mat = four.mat) #results

Re: [R] (no subject)

2023-01-26 Thread Hasan Diwan
Upananda. On Mon, 16 Jan 2023 at 12:55, Upananda Pani wrote: > Greetings! I would like to know how to create the lag variable for my data. > Kindly provide a link to your data, on a publicly accessible page or a means to generate fake data that illustrates your issue. -- H -- OpenPGP:

Re: [R] Failing to install the rgl package

2023-01-26 Thread David Winsemius
On 1/26/23 11:04, Tunga Kantarcı wrote: Hi, I try to execute the seven lines of code below to plot a graph. But I am failing as the messages below show. Where am I going wrong? install.packages("rgl") library(rgl) y_hat = X%*%B_hat open3d(windowRect = c(100,100,900,900),family = "serif")

[R] Failing to install the rgl package

2023-01-26 Thread Tunga Kantarcı
Hi, I try to execute the seven lines of code below to plot a graph. But I am failing as the messages below show. Where am I going wrong? install.packages("rgl") library(rgl) y_hat = X%*%B_hat open3d(windowRect = c(100,100,900,900),family = "serif") color = rainbow(length(y_hat))[rank(y_hat)]

Re: [R-es] Resumen de R-help-es, Vol 167, Envío 10

2023-01-26 Thread Griera-yandex
Hola: Funciona a la perfección. Y los nombres de las nuevas variables tipo "V1c" "V2c"... ya me está bien. Gracias por habertelo currado tanto! Me has ahorrado copiar, pegar y modificar un monton de linias. Y no tenia conciencia de que podia ser tan complicado. Gracias por la ayuda. Saludos.

Re: [R] R installation

2023-01-26 Thread Bert Gunter
What is the error, **exactly**? Bert On Thu, Jan 26, 2023 at 9:12 AM Vivian Jungels via R-help < r-help@r-project.org> wrote: > Hello! > > I am trying to install R and its says there is an error with the software. > I am using the link for Mac OS the most recent version on the website > because

Re: [R] R installation

2023-01-26 Thread Kevin Thorpe
If you used this link for R-4.2.2-arm64.pkg then I have no other ideas. The r-sig-mac list can probably help you more, but there is the possibility you will get help here. > On Jan 26, 2023, at 12:19 PM, Vivian Jungels wrote: > > I have an M1 Mac with OS 13.2 so I did the most recent version

Re: [R] R installation

2023-01-26 Thread Kevin Thorpe
The most obvious question is did you download the correct package? There is a version for Intel-based MACs and for M1-based MACs. > On Jan 25, 2023, at 11:22 AM, Vivian Jungels via R-help > wrote: > > Hello! > > I am trying to install R and its says there is an error with the software. I

[R] R installation

2023-01-26 Thread Vivian Jungels via R-help
Hello! I am trying to install R and its says there is an error with the software. I am using the link for Mac OS the most recent version on the website because my Mac OS is M1 and 13.2 version. I am able to download it but then when I install it it says they’re an error with the software that

Re: [R-es] Resumen de R-help-es, Vol 167, Envío 10

2023-01-26 Thread Griera-yandex
Muchas gracias por responder! Después lo hago. Saludos. On Thu, 26 Jan 2023 09:33:31 -0500 patricio fuenmayor wrote: > Hola esta es una solución > > library(data.table) > library(stringr) > > > dt <- data.table( V1a = sample(c("1","0"), 10, TRUE) > , V1b =

Re: [R] Shadow Graphics Error in R Studio

2023-01-26 Thread Thomas Subia via R-help
Brinkley, I am using R studio with R version 4.2.0 (2022-04-22 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19045) I cannot reproduce your error messages. That being said, you might want to look at:   https://github.com/rstudio/rstudio/issues/2214

Re: [R] akima interp results to zero with less than 10 values

2023-01-26 Thread PIKAL Petr
Hallo Duncan Thanks, I was not aware of this package. I will try. Petr > -Original Message- > From: Duncan Murdoch > Sent: Thursday, January 26, 2023 3:44 PM > To: PIKAL Petr ; r-help@r-project.org > Subject: Re: [R] akima interp results to zero with less than 10 values > > The akima

Re: [R] akima interp results to zero with less than 10 values

2023-01-26 Thread Duncan Murdoch
The akima package has a problematic license (it doesn't allow commercial use), so it's been recommended that people use the interp package instead. When I use interp::interp instead of akima::interp, I get reasonable output from your example. So that's another reason to drop akima... Duncan

[R] akima interp results to zero with less than 10 values

2023-01-26 Thread PIKAL Petr
Dear all I have this table > dput(mat) mat <- structure(c(2, 16, 9, 2, 16, 1, 1, 4, 7, 7, 44.52, 42.8, 43.54, 40.26, 40.09), dim = c(5L, 3L)) And I want to calculate result for contour or image plots as I did few years ago. However interp does not compute the z values and gives me zeros in z

Re: [R-es] Resumen de R-help-es, Vol 167, Envío 10

2023-01-26 Thread patricio fuenmayor
Hola esta es una solución library(data.table) library(stringr) dt <- data.table( V1a = sample(c("1","0"), 10, TRUE) , V1b = sample(c("1","0"), 10, TRUE) , V2a = sample(c("1","0"), 10, TRUE) , V2b = sample(c("1","0"), 10, TRUE) ,

Re: [R] Minimal match to regexp?

2023-01-26 Thread Duncan Murdoch
I'll submit a bug report. On 25/01/2023 8:38 p.m., Andrew Simmons wrote: It seems like a bug to me. Using perl = TRUE, I see the desired result: ``` x <- "\n```html\nblah blah \n```\n\n```r\nblah blah\n```\n" pattern2 <- "\n([`]{3,})html\n.*?\n\\1\n" cat(regmatches(x, regexpr(pattern2, x,

[R-es] Modificar una serie columnas de un dataframe

2023-01-26 Thread Griera
Hola: Lo vuelvo a enviar para ver si tengo más suerte: Tengo una tabla con pares de variables (V1a, V1b, V2a, V2b, ...) similar a esta: df <- data.frame( V1a = sample(c("1","0"), 10, TRUE) , V1b = sample(c("1","0"), 10, TRUE) , V2a = sample(c("1","0"), 10, TRUE)