Re: [R-es] Redo en RStudio, Ctrl y?

2020-08-19 Thread Xavier-Andoni Tibau Alberdi
No se si tiene nada que ver. Pero en mi caso es porque uso SO en aleman. u de hecho, es cotrol+alt+Z en todo, no solo Rstudio. Salud! Xavi El jue., 20 ago. 2020 5:31, Manuel Mendoza escribió: > Gracias Xavier, ctr+alt+Z si me funciona y me será de gran utilidad. > Carlos, si pone "Ctrl Y",

Re: [R-es] Redo en RStudio, Ctrl y?

2020-08-19 Thread Manuel Mendoza
Gracias Xavier, ctr+alt+Z si me funciona y me será de gran utilidad. Carlos, si pone "Ctrl Y", y no funciona, pero sí funciona ctr+alt+Z, supongo que es un error de programación. Miraré lo de la comunidad de RStudio, a ver que me dicen. Gracias, Manuel El mié., 19 ago. 2020 a las 21:57,

Re: [R] & and |

2020-08-19 Thread Richard O'Keefe
There are & and | operators in the R language. There is an | operator in regular expressions. There is NOT any & operator in regular expressions. grep("ConfoMap", mydata, value=TRUE) looks for elements of mydata containing the literal string 'ConfoMap'. > foo <- c("a","b","cab","back") >

Re: [R] Trouble getting labels for bars in Pareto Chart

2020-08-19 Thread Jim Lemon
Hi Paul, I ran this: library(qcc) pareto.chart(dataset2$Points) and like you, got the chart. As you have 140 long labels, I thought at first it might be the function trying to abbreviate some of them and actually displaying about 1 in 5. Looking at the code for the function, this is not the

Re: [R] Trouble getting labels for bars in Pareto Chart

2020-08-19 Thread Rasmus Liland
Dear Paul, I answer inline: On 2020-08-19 16:27 -0500, Paul Bernal wrote: | | I tried using the function | pareto.chart from the qcc package, but | the names of the columns in the pareto | chart are some codes What codes? Can you please elaborate on this? | that do not match the school

Re: [R] & and |

2020-08-19 Thread Rasmus Liland
On Wed, Aug 19, 2020 at 7:53 AM Ivan Calandra wrote: | | I have the following vector: | mydata <- | c("SSFA-ConfoMap_GuineaPigs_NMPfilled.csv", | "SSFA-ConfoMap_Lithics_NMPfilled.csv", | "SSFA-ConfoMap_Sheeps_NMPfilled.csv", | "SSFA-Toothfrax_GuineaPigs.xlsx",

[R] Trouble getting labels for bars in Pareto Chart

2020-08-19 Thread Paul Bernal
Dear friends, Hope you are doing well. I am currently using R version 3.6.2. I installed and loaded package qcc by Mr. Luca Scrucca. This is the structure of my data: str(dataset2) 'data.frame': 140 obs. of 2 variables: $ School: Factor w/ 140 levels "24 de Diciembre",..: 39 29 66 16 67 116

Re: [R-es] Redo en RStudio, Ctrl y?

2020-08-19 Thread Xavier-Andoni Tibau Alberdi
En mi caso a veces funciona ctr+alt+Z. El mié., 19 ago. 2020 21:46, Carlos Ortega escribió: > Hola Manuel, > > En Mac son otra combinación, pero sí que funcionan. > RStudio tiene un grupo de soporte (más bien es una Community) donde podrías > comentarlo por si es un bug. > > Saludos, > Carlos

Re: [R-es] Redo en RStudio, Ctrl y?

2020-08-19 Thread Carlos Ortega
Hola Manuel, En Mac son otra combinación, pero sí que funcionan. RStudio tiene un grupo de soporte (más bien es una Community) donde podrías comentarlo por si es un bug. Saludos, Carlos Ortega www.qualityexcellence.es El mié., 19 ago. 2020 a las 19:52, Manuel Mendoza (<

[R-es] Redo en RStudio, Ctrl y?

2020-08-19 Thread Manuel Mendoza
Buenas tardes. Más bien una curiosidad. Echaba de menos poder rehacer con *Ctrl y* lo deshecho con *Ctrl z*. Lo curioso es que RStudio, desde hace un tiempo, en la pestaña *Edit*, al lado de *Redo *pone "*Ctrl y", *pero *Ctrl y* no funciona. ¿sabe alguien por qué? Gracias, Manuel

Re: [R] combine filter() and select()

2020-08-19 Thread Jeff Newmiller
The whole point of dplyr primitives is to support data frames... that is, lists of columns. When you pare your data frame down to one column you are almost certainly using the wrong tool for the job. So, sure, your code works... and it even does what you wanted in the dplyr style, but what a

Re: [R] combine filter() and select()

2020-08-19 Thread Chris Evans
Inline - Original Message - > From: "Ivan Calandra" > To: "R-help" > Sent: Wednesday, 19 August, 2020 16:56:32 > Subject: [R] combine filter() and select() > Dear useRs, > > I'm new to the tidyverse world and I need some help on basic things. > > I have the following tibble: > mytbl

Re: [R] & and |

2020-08-19 Thread William Dunlap via R-help
Instead of intersect you could use grepl(pattern1,x) & grepl(pattern2,x). Use which() on the result if you must have integers, but the logicals that grepl() produces are often easier to use as subscripts. Bill Dunlap TIBCO Software wdunlap tibco.com On Wed, Aug 19, 2020 at 8:54 AM Ivan Calandra

Re: [R] & and |

2020-08-19 Thread Henrik Bengtsson
A version of Eric's answer is to use grepl(), which returns a logical vector: mydata[grepl("ConfoMap", mydata) & grepl("GuineaPigs", mydata)] with the OR analogue: mydata[grepl("ConfoMap", mydata) | grepl("GuineaPigs", mydata)] /Henrik On Wed, Aug 19, 2020 at 8:24 AM Ivan Calandra wrote: > >

Re: [R] & and |

2020-08-19 Thread Ivan Calandra
Indeed! I was just hoping that there would be a shorter way... intersect() is a nice alternative too. Maybe I can make it work with pipes so that I don't have to repeat "mydata" but that's another story. Thank you for the help! Ivan -- Dr. Ivan Calandra TraCEr, laboratory for Traceology and

Re: [R] & and |

2020-08-19 Thread Bert Gunter
Well... wouldn't it be: rep("(ConfoMap.*GuineaPigs)|(GuineaPigs.*ConfoMap)", mydata, value=TRUE) Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Wed, Aug 19,

Re: [R] & and |

2020-08-19 Thread Ivan Calandra
Thank you Bert for the pointer. So I guess the solution is: grep("ConfoMap.+GuineaPigs", mydata, value=TRUE) This is not the case here, but what if "GuineaPigs" comes before "ConfoMap"? Of course I could do two "grep()" calls, but if there a better solution? Ivan -- Dr. Ivan Calandra TraCEr,

Re: [R] & and |

2020-08-19 Thread Ivan Calandra
Thank you Eric, I didn't think about intersect(). Now I'm trying to do that in tidyverse with pipes, and I think that's too much for me for now! Ivan -- Dr. Ivan Calandra TraCEr, laboratory for Traceology and Controlled Experiments MONREPOS Archaeological Research Centre and Museum for Human

Re: [R] & and |

2020-08-19 Thread Eric Berger
mydata[ intersect( grep("ConfoMap", mydata), grep("GuineaPigs", mydata) ) ] On Wed, Aug 19, 2020 at 6:13 PM Bert Gunter wrote: > "&" is not a regex metacharacter. > See ?regexp > > Bert Gunter > > "The trouble with having an open mind is that people keep coming along and > sticking things

Re: [R] & and |

2020-08-19 Thread Bert Gunter
"&" is not a regex metacharacter. See ?regexp Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Wed, Aug 19, 2020 at 7:53 AM Ivan Calandra wrote: > Dear useRs,

[R] combine filter() and select()

2020-08-19 Thread Ivan Calandra
Dear useRs, I'm new to the tidyverse world and I need some help on basic things. I have the following tibble: mytbl <- structure(list(files = c("a", "b", "c", "d", "e", "f"), prop = 1:6), row.names = c(NA, -6L), class = c("tbl_df", "tbl", "data.frame")) I want to subset the rows with "a" in the

[R] & and |

2020-08-19 Thread Ivan Calandra
Dear useRs, I feel really stupid, but I cannot understand why "&" doesn't work as I expect, while "|" does. I have the following vector: mydata <- c("SSFA-ConfoMap_GuineaPigs_NMPfilled.csv", "SSFA-ConfoMap_Lithics_NMPfilled.csv",  "SSFA-ConfoMap_Sheeps_NMPfilled.csv",

Re: [R] R Script Modification Questions

2020-08-19 Thread Rasmus Liland
Dear Stephen, I answer inline: On 2020-08-19 12:57 +1000, Jim Lemon wrote: | On Wed, Aug 19, 2020 at 3:09 AM Stephen P. Molnar wrote: | | | | What I would like to do is use | | linetype, rather than color, in line | | 27. You need to specify linetype instead of color in ggplot::aes, like

Re: [R] Change how minpack.lm:::summary.nls.lm calculates degrees of freedom

2020-08-19 Thread Valerio Leone Sciabolazza
Eric, you are right! If I run the code on a different instance, it works. There must be something in my old R environment that messed this up. Thank you very much for checking this out. Best, Valerio On Wed, Aug 19, 2020 at 11:36 AM Eric Berger wrote: > > Hi Valerio, > I did a copy-paste on your

Re: [R] Change how minpack.lm:::summary.nls.lm calculates degrees of freedom

2020-08-19 Thread Eric Berger
Hi Valerio, I did a copy-paste on your reproducible example and I had no problem with chol(nls.out$hessian). In addition to summary() you can look at str() to display the structure of any R object. > str(nls.out) List of 9 $ par :List of 3 ..$ a: num 8.99 ..$ b: num -1.01 ..$ c: num

[R] Change how minpack.lm:::summary.nls.lm calculates degrees of freedom

2020-08-19 Thread Valerio Leone Sciabolazza
Dear R users, I want to modify how the degrees of freedom are calculated from the summary function of the package minpack.lm My first thought was to replicate how minpack.lm:::summary.nls.lm works, and modify the line of the code that is relevant for my task. However, for some reason I am not

Re: [R] Binomial PCA Using pcr()

2020-08-19 Thread Ulrik Stervbo via R-help
Hi Prasad, I think this might be a problem with the package, and you can try to contact the package author. The error seem to arise because the pcr() cannot find the 'negative-binomial' distribution ``` library(qualityTools) x <- rnbinom(500, mu = 4, size = 100) pcr(x, distribution =