Re: [R] Alignment of the title in a key for xyplot in lattice.

2019-12-23 Thread Rolf Turner
On 24/12/19 2:29 pm, Jim Lemon wrote: Hi Rolf, Following the docs back to draw.key, It looks like the ellipsis argument is ignored. I was hoping for a brilliant solution along the lines of: adj=0 that could be passed down the functions like a hot potato, but was disappointed. Thanks for

Re: [R] help with if statement with two conditions

2019-12-23 Thread Steinmann, Kimberly@CDPR
Hi Jim, Burt and all who have been so helpful - very much appreciated! I have managed to get the code to run correctly by extending the parentheses around the whole statement, including the &, rather than parentheses around the two clauses on either side of the &. It seems to have done the

Re: [R] Alignment of the title in a key for xyplot in lattice.

2019-12-23 Thread Jim Lemon
Hi Rolf, Following the docs back to draw.key, It looks like the ellipsis argument is ignored. I was hoping for a brilliant solution along the lines of: adj=0 that could be passed down the functions like a hot potato, but was disappointed. Jim On Tue, Dec 24, 2019 at 9:26 AM Rolf Turner wrote:

Re: [R] help with if statement with two conditions

2019-12-23 Thread Jim Lemon
Hi Kimberley, Given the number of posts that read "I have a problem, please advise", your concern for our mental welfare is a great Xmas present. Jim On Tue, Dec 24, 2019 at 10:38 AM Steinmann, Kimberly@CDPR wrote: > > I am not sure how to close the thread - I hate to waste anyone's time on a

Re: [R] Converting AIS Message to Number

2019-12-23 Thread Jim Lemon
Hi Paul, For your first question: max(file.info(".")$mtime) [1] "2019-12-21 21:04:19 AEDT" As for the second, I didn't know what an AIS file was, so I googled it. I still don't know, so I don't have a clue how to turn a string like that into a number. Jim On Tue, Dec 24, 2019 at 5:14 AM Paul

Re: [R] help with if statement with two conditions

2019-12-23 Thread Jim Lemon
Hi Kimberley, Since you are using a loop and therefore testing one value of v_trends_lbs at a time, the "&" in the "if" statement should be "&&". Pinching Bert's example but using a for loop instead of ifelse: x <- seq(-2,2,.25) v_lbs<-rep("",length(x)) for(i in 1:length(x)) { if(is.na(x[i]))

[R] Alignment of the title in a key for xyplot in lattice.

2019-12-23 Thread Rolf Turner
The title of a key seems to be horizontally centred in the key; I would like to have it aligned with the left hand edge. I.e. I would like the first letter of the title to have the same horizontal position as the first letters of the text strings. E.g. in the attached example I would like

[R] Split

2019-12-23 Thread Medic
Dear Burt, you gave a very elegant solution. Many thanks! Jeff, I understand your solution, thank you very much for your time! Colleague Milos, patronage is exactly what I need. I hope for your further guidance! (Rcmdr is not enough for some purposes.) Dear Ivan, I used your solution! It's the

Re: [R] help with if statement with two conditions

2019-12-23 Thread Bert Gunter
WITHOUT going through your code carefully (but where is v_lbs first defined?), maybe something like this is what you want: > x <- seq(-2,2,.25) > x [1] -2.00 -1.75 -1.50 -1.25 -1.00 -0.75 -0.50 -0.25 0.00 0.25 0.50 0.75 1.00 [14] 1.25 1.50 1.75 2.00 > x <- ifelse(x>0 & x<1, '<1',

Re: [R] R code required

2019-12-23 Thread Jeff Newmiller
You are corresponding to a mailing list, but you need to be corresponding with the author of the paper you are referring to. I have no idea who that is or what the paper is that you are referring to. On December 23, 2019 6:32:26 AM PST, Salwa El-Aty wrote: > > >Dear Sir >I want to help me

Re: [R] help with if statement with two conditions

2019-12-23 Thread Patrick (Malone Quantitative)
What does the error message say? On Mon, Dec 23, 2019, 3:33 PM Steinmann, Kimberly@CDPR < kimberly.steinm...@cdpr.ca.gov> wrote: > Hi - i am not super familiar with R, but need to modify my predecessor's R > code so that if a variable is >0 and < 0.5, it will be replaced with <1. I > have looked

Re: [R] Tinn-R project: new version (6.01.01.03) released

2019-12-23 Thread Felipe Carrillo via R-help
Josè Sent from Yahoo Mail on Android On Mon, Dec 23, 2019 at 12:15 PM, Abby Spurdle wrote: Hi Jose,Same here, I use tinn-R on a daily basis..thanks for the update and have a merry christmas That's awesome. I used Tinn-R, back in 2006, when I starting learning nontrivial R

[R] R code required

2019-12-23 Thread Salwa El-Aty
Dear Sir I want to help me about to send the R Code of paper which title Inference of Generalized endpoint inflated binomial regression . In . 2017 Best Regards Salwa. A.Mousa Sent from my Samsung device [[alternative HTML version deleted]]

[R] help with if statement with two conditions

2019-12-23 Thread Steinmann, Kimberly@CDPR
Hi - i am not super familiar with R, but need to modify my predecessor's R code so that if a variable is >0 and < 0.5, it will be replaced with <1. I have looked at a bunch of forum threads on the subject, but cannot seem to get anything to work Any help at what i might be doing wrong much

Re: [R] Tinn-R project: new version (6.01.01.03) released

2019-12-23 Thread Abby Spurdle
Hi Jose, That's awesome. I used Tinn-R, back in 2006, when I starting learning nontrivial R programming. I used it extensively, before shifting to my own (still incomplete) programming environment. Back then, Emacs (with ESS) had the monopoly on Linux, and Tinn-R was leading the race on Windows.

Re: [R] Split

2019-12-23 Thread Miloš Žarković
J have just seen your follow-up post (out of tread). I don’t want to be rude or patronizing but few caveats. Neither R nor R help are meant to be user friendly. Learning curve is steep but very rewarding at the end. Problem you have can be solved in a literary hundred ways. Unfortunately, your

Re: [R] Split

2019-12-23 Thread Bert Gunter
Do you mean IQR? -- I don't know what ICR means. If so, see IQR. More generally see ?by or more generally ?tapply to obtain whatever sort of summary you want. e.g. > d <-data.frame( x = runif(10), w = rep(c("a","b"),5)) > by(d$x, d$w, FUN = function(x)c(median = median(x),IQR = IQR(x))) d$w: a

Re: [R] Split

2019-12-23 Thread Miloš Žarković
If I understand correctly you need summary by group. I would suggest arsenal package and tableby tab1 <- tableby(group ~ anova(var, "meansd", digits=1) + #mean and sd + round to 1 digit + anova kwt(var, "medianq1q3", digits=1) , #median q1 and q3 + round to 1 digit +

Re: [R] Converting AIS Message to Number

2019-12-23 Thread Bert Gunter
The "digest" package might be what you're looking for: messages --> numerics Or perhaps you want to create a hash in R. Search on "hashing in R" or similar for info on this. See ?file.info for obtaining file info, including date/time info. Bert Gunter "The trouble with having an open mind is

[R] Converting AIS Message to Number

2019-12-23 Thread Paul Bernal
Dear friends, Hope you are doing great. I would like to process an AIS file (which comes in either a .txt or .csv format). The AIS file is contained in a specific path, say C:/AISFiles/File.txt. The file contains messages like the following:

Re: [R] Split

2019-12-23 Thread Ivan Krylov
On Mon, 23 Dec 2019 17:56:35 +0300 Medic wrote: > I would like to split > mydata$var > by > mydata$group #to get var1 and var2 There is the split() function that does exactly that (except it returns a list instead of multiple variables)... > And then get > summary (var1, var2) #this is my

Re: [R] all the MAE metric values are missing (Error message)

2019-12-23 Thread Michael Dewey
What Jim is alluding to is that sometimes in the process of reading in data a small typo can mean that what was intended to be a numeric variable is read in as a factor. So he was suggesting that you double check that this has not happened to you. Michael On 23/12/2019 11:45, Neha gupta

[R] Split

2019-12-23 Thread Medic
I have mydata$var #this is ONE group of patients And I would like to get median and ICR of mydata$var. How can I get this? With summary (mydata$var)! Ok! And now I would like to get THE SAME, but for TWO group: male and female (which are contained in the group mydata$var) How can I get this?

Re: [R] Split

2019-12-23 Thread Jeff Newmiller
Not clear what you mean by summary (var1, var2) ? That is not a legal way to call summary. Perhaps mt <- mtcars[,c("cyl","hp")] mt$cyl <- factor( mt$cyl ) mtl <- split(mt[,"hp",drop=FALSE], mt$cyl) lapply(mtl,summary) On December 23, 2019 6:56:35 AM PST, Medic wrote: >I have >mydata$var >

Re: [R] R API Call Failure Help

2019-12-23 Thread Bert Gunter
Thanks. I stand corrected. But... https://shiny.rstudio.com/ Cheers, Bert On Mon, Dec 23, 2019 at 6:29 AM Jeff Newmiller wrote: > Shiny is not an app... it is a contributed R package on CRAN. Of course, > with 15000 packages on CRAN this mailing list cannot necessarily support > questions

Re: [R] Split

2019-12-23 Thread Bert Gunter
?ave 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 Mon, Dec 23, 2019 at 6:57 AM Medic wrote: > I have > mydata$var > > and I have > mydata$group #two group

[R] Split

2019-12-23 Thread Medic
I have mydata$var and I have mydata$group #two group I would like to split mydata$var by mydata$group #to get var1 and var2 And then get summary (var1, var2) #this is my finite aim How to encode it all? __ R-help@r-project.org mailing list -- To

[R] Tinn-R project: new version (6.01.01.03) released

2019-12-23 Thread Jose Claudio Faria
Hi, A new version of Tinn-R project (6.01.01.03) was released today. Download: - https://nbcgib.uesc.br/tinnr/en/download - https://sourceforge.net/projects/tinn-r/files/Tinn-R setup/ What is new: - https://nbcgib.uesc.br/tinnr/en/download#patch -

Re: [R] R API Call Failure Help

2019-12-23 Thread Jeff Newmiller
Shiny is not an app... it is a contributed R package on CRAN. Of course, with 15000 packages on CRAN this mailing list cannot necessarily support questions about all of them (read the Posting Guide). That said, this question does not seem like the use of shiny is necessarily relevant because

Re: [R] all the MAE metric values are missing (Error message)

2019-12-23 Thread Neha gupta
Hi Jim, Another possibility is that the values used in the initial calculation have been read in as factors Which calculation you are talking about? I did not use factors as variable. Regards On Mon, Dec 23, 2019 at 3:12 AM Jim Lemon wrote: > Hi Neha, > Well, that's a clue to why you are