Re: [R] How to draw plot marks without label?

2023-09-05 Thread Luigi Marongiu
Thank you that is exactly it. I know these are basic questions but I can't find the solution on either manuals or online... Best regards Luigi On Tue, Sep 5, 2023 at 11:33 PM Bert Gunter wrote: > > Luigi: > > For base R graphics, you should always consult ?par for optional graphical >

Re: [R] How to draw plot marks without label?

2023-09-05 Thread Bert Gunter
Luigi: For base R graphics, you should always consult ?par for optional graphical parameters when the high level graphics function doesn't appear to provide the control you would like. I don't use base graphics -- i.e. i"m not particularly facile with it -- but as you provided an example, I

Re: [R] How to draw plot marks without label?

2023-09-05 Thread Paul Murrell
Hi Do you mean like this ... ? stripchart(df$Y ~ df$X, method = "jitter", offset=1/3, vertical = TRUE, las=1, pch=16, cex=2, ylab="Y", xlab="X", main="Example", axes=FALSE) box() axis(1) axis(2, labels=FALSE) axis(4,

[R] How to draw plot marks without label?

2023-09-05 Thread Luigi Marongiu
I would like to draw a graph where the y-lables are missing but the marks still present. In this example, I get marks from 2 to 140 000 with increments of 20 000. I could use `plot(... yaxt="n"...)` combined with `axis(2, at..., label="")` but this needs to know exactly the sequence of marks

Re: [R] Regarding error in RStudio

2023-09-05 Thread Ivan Krylov
5 сентября 2023 г. 19:02:56 UTC, Sukriti Sood пишет: >I uninstalled and reinstalled both R and RStudio themselves multiple times. Knitr lives separately from R and RStudio in a "library", most likely under your %userprofile%. Try using install.packages to install it anew. Can you load knitr

Re: [R] Regarding error in RStudio

2023-09-05 Thread Ivan Krylov
Sounds like something weird happened to your installation of the knitr package. It could help to reinstall it. If you don't have anything valuable saved in %userprofile%\.RData, it may be worth moving it away, because it may be carrying a part of the broken state. (Saving state in .RData may be

Re: [R] Regarding error in RStudio

2023-09-05 Thread Rui Barradas
Às 17:59 de 05/09/2023, Sukriti Sood escreveu: Hi, I am Sukriti Sood, a research analyst at Woodstock Institute . I use RStudio extensively for our analysis. I have been facing two issues for a while: 1. I am unable to copy from RStudio and paste into or

Re: [R] Regarding error in RStudio

2023-09-05 Thread Jeff Newmiller
R is not RStudio. RStudio is not R. RStudio helps you work with R, but to do so it "types" in some commands behind the scenes. I suspect those errors are because you have a pairing of versions of RStudio with a version of R that the RStudio team did not test. Someone here might be able to

[R] Regarding error in RStudio

2023-09-05 Thread Sukriti Sood
Hi, I am Sukriti Sood, a research analyst at Woodstock Institute . I use RStudio extensively for our analysis. I have been facing two issues for a while: 1. I am unable to copy from RStudio and paste into or vice versa to any other programs. 2. I am facing

Re: [R] Merge and replace data

2023-09-05 Thread roslinazairimah zakaria
Thank you for the general code. Really appreciate it. On Tue, Sep 5, 2023 at 7:59 PM Eric Berger wrote: > As Duncan points out, ifelse() provides a more general approach than > the specific pmax(). > > Even more generally, you might want to consider the apply() function > (and its relatives

Re: [R] Merge and replace data

2023-09-05 Thread roslinazairimah zakaria
Thank you for the general code. Really appreciate it. On Tue, Sep 5, 2023 at 7:45 PM Duncan Murdoch wrote: > On 05/09/2023 4:55 a.m., roslinazairimah zakaria wrote: > > Hi all, > > > > I have these data > > > > x1 <- c(116,0,115,137,127,0,0) > > x2 <- c(0,159,0,0,0,159,127) > > > > I want : xx

Re: [R] Merge and replace data

2023-09-05 Thread Eric Berger
As Duncan points out, ifelse() provides a more general approach than the specific pmax(). Even more generally, you might want to consider the apply() function (and its relatives sapply(), lapply(), ...) For example apply(cbind(x1,x2), MAR=1, max) In the above statement, x1 and x2 are combined

Re: [R] Finding combination of states

2023-09-05 Thread Bert Gunter
Oh I liked that. I was actually thinking about something similar, but couldn't figure it out. The idiom you showed is very clever imo and taught me something about regexes that I never properly understood. Bert On Tue, Sep 5, 2023, 01:04 Eric Berger wrote: > Hi Bert, > I really liked your

Re: [R] Merge and replace data

2023-09-05 Thread Duncan Murdoch
On 05/09/2023 4:55 a.m., roslinazairimah zakaria wrote: Hi all, I have these data x1 <- c(116,0,115,137,127,0,0) x2 <- c(0,159,0,0,0,159,127) I want : xx <- c(116,115,137,127,159, 127) I would like to merge these data into one column. Whenever the data is '0' it will be replaced by the value

Re: [R] Merge and replace data

2023-09-05 Thread roslinazairimah zakaria
Thank you very much for your help. On Tue, Sep 5, 2023 at 6:39 PM Rui Barradas wrote: > Às 09:55 de 05/09/2023, roslinazairimah zakaria escreveu: > > Hi all, > > > > I have these data > > > > x1 <- c(116,0,115,137,127,0,0) > > x2 <- c(0,159,0,0,0,159,127) > > > > I want : xx <-

Re: [R] Merge and replace data

2023-09-05 Thread roslinazairimah zakaria
Thank you very much for your help. On Tue, Sep 5, 2023 at 6:12 PM Eric Berger wrote: > xx <- pmax(x1,x2) > > On Tue, Sep 5, 2023 at 11:56 AM roslinazairimah zakaria > wrote: > > > > Hi all, > > > > I have these data > > > > x1 <- c(116,0,115,137,127,0,0) > > x2 <- c(0,159,0,0,0,159,127) > > >

Re: [R] Merge and replace data

2023-09-05 Thread Rui Barradas
Às 09:55 de 05/09/2023, roslinazairimah zakaria escreveu: Hi all, I have these data x1 <- c(116,0,115,137,127,0,0) x2 <- c(0,159,0,0,0,159,127) I want : xx <- c(116,115,137,127,159, 127) I would like to merge these data into one column. Whenever the data is '0' it will be replaced by the

Re: [R-es] stackOverflowError

2023-09-05 Thread Manuel Mendoza
Esta es la respuesta que me da chatgpt 4.0. Yo llevo unos meses utilizándolo y me ha ahorrado muchos días de trabajo. Le podéis hacer cualquier pregunta sobre códigos, errores, métodos, cómo hacer algo, cómo enfocar un problema, etc. Es como tener a un experto (que también se equivoca) a tu

Re: [R] Merge and replace data

2023-09-05 Thread Eric Berger
xx <- pmax(x1,x2) On Tue, Sep 5, 2023 at 11:56 AM roslinazairimah zakaria wrote: > > Hi all, > > I have these data > > x1 <- c(116,0,115,137,127,0,0) > x2 <- c(0,159,0,0,0,159,127) > > I want : xx <- c(116,115,137,127,159, 127) > > I would like to merge these data into one column. Whenever the

[R] Merge and replace data

2023-09-05 Thread roslinazairimah zakaria
Hi all, I have these data x1 <- c(116,0,115,137,127,0,0) x2 <- c(0,159,0,0,0,159,127) I want : xx <- c(116,115,137,127,159, 127) I would like to merge these data into one column. Whenever the data is '0' it will be replaced by the value in the column which is non zero.. I tried append and

[R-es] stackOverflowError

2023-09-05 Thread Enrique Ramalle Gomara via R-help-es
Buenos dias tengo un procedimiento de selección de casos que cumplen una condición u otra u otra u otra, etc. La condición se repite para 20 variables y son condiciones múltiples (más de 50) que he unido con un OR (|). Afecta a una base de datos con mas de 14 filas. Cuando lo ejecuta me da

Re: [R] Finding combination of states

2023-09-05 Thread Eric Berger
Hi Bert, I really liked your solution. In the spirit of code golf, I wondered if there is a shorter way to do the regular expression test. Kudos to my coding buddy GPT-4 for the following: You can replace your statement out[-grep(paste(paste0(states,states), collapse = "|"),out)] by

[R] Error in analysis of arguments of Rasch

2023-09-05 Thread nor azila
Dear R users, I am using ltm and eRm package in analysing my polytomous data for fitting item response theory and Rasch model, respectively. I'm having a problem with the error as below; > library(eRm) > library(ltm) > HT <- read.csv("C:/Dropbox/Analysis R_2023/HT.csv") > response_columns <-