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 giving it some thought.  Actually I've found a work-around: 
make the title the first entry of the text component of the key, with 
the corresponding entries of the other components being NA.  And 
omitting the "title" argument.


An example of the result is attached.  It satisfies me, at least! :-)

cheers,

Rolf

--
Honorary Research Fellow
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276


xmpl2.pdf
Description: Adobe PDF document
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


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 trick!
I am not sure how to close the thread - I hate to waste anyone's time on a 
problem that is no longer a problem! I am new to this forum

Thanks again for all the feedback and help everyone!

-Kimberly

-Original Message-
From: Jim Lemon 
Sent: Monday, December 23, 2019 3:33 PM
To: Steinmann, Kimberly@CDPR ; r-help mailing 
list 
Subject: Re: [R] help with if statement with two conditions

EXTERNAL:


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])) v_lbs<-"0"
  else {
   if(x[i] < 0.51 && x[i] > 0) v_lbs[i]<-"<1"
   else v_lbs[i] <- format(round(x[i]), big.mark=",",scientific=FALSE)  } } x 
v_lbs

I think this gives you the "right" answer, as I have used 0.51 to avoid the 
rounding problem at 0.5. I can see that the output is feeding into something 
else, and an incorrect value at the end of your calculations would be more 
difficult to track back. Bert's "ifelse" is a more elegant way to do this, 
although not quote as easy for the beginner to understand.

Jim

On Tue, Dec 24, 2019 at 7:33 AM Steinmann, Kimberly@CDPR 
 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 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 
> appreciated. I am definitely an R newbie!
>
> current code that works:
>   v_lbs_list <- ""
>   for (j in 2:(p_num_years+1)) {
>  if (is.na(v_trends_lbs[i, j])) {
> v_lbs <- ' 0 '
>  } else if (v_trends_lbs[i, j] < 0.5) {
> v_lbs <- ' $<$1 '
>  } else {
> v_lbs <- format(round(v_trends_lbs[i, j]), big.mark=",", 
> scientific=FALSE)
>  }
>  v_lbs_list <- paste(v_lbs_list, ' & ', v_lbs)
>   }
>
> my attempt to add a >0 that gets an error  pointing at the & sign:
>   v_lbs_list <- ""
>   for (j in 2:(p_num_years+1)) {
>  if (is.na(v_trends_lbs[i, j])) {
> v_lbs <- ' 0 '
>  } else if (v_trends_lbs[i, j] < 0.5) & (v_trends_lbs[i, j] > 0) {
> v_lbs <- ' $<$1 '
>  } else {
> v_lbs <- format(round(v_trends_lbs[i, j]), big.mark=",", 
> scientific=FALSE)
>  }
>  v_lbs_list <- paste(v_lbs_list, ' & ', v_lbs)
>   }
>
> Thanks for any help!
>
>
> CONFIDENTIALITY NOTICE: This e-mail message, including
> a...{{dropped:10}}
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat
> .ethz.ch%2Fmailman%2Flistinfo%2Fr-helpdata=02%7C01%7CKimberly.Ste
> inmann%40cdpr.ca.gov%7C7007357d15244e97a63108d7880088a1%7C0fc528a55d14
> 4d0da7bef2487d8d0e30%7C0%7C1%7C637127408183702102sdata=x2ugp%2Bs%
> 2BYE%2BmCANwK0QIGtKnfOcHJ0Xpf%2BYZzUTgPxs%3Dreserved=0
> PLEASE do read the posting guide
> https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.R
> -project.org%2Fposting-guide.htmldata=02%7C01%7CKimberly.Steinman
> n%40cdpr.ca.gov%7C7007357d15244e97a63108d7880088a1%7C0fc528a55d144d0da
> 7bef2487d8d0e30%7C0%7C1%7C637127408183702102sdata=sFBbNktlRfA4FZX
> 5qTQdkcNYOx8xNX6MGU2MKnFLoSE%3Dreserved=0
> and provide commented, minimal, self-contained, reproducible code.
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for 
the sole use of the intended recipient(s) and may contain confidential and 
privileged information. Any unauthorized review, use, disclosure, or 
distribution is prohibited. If you are not the intended recipient, please 
contact the sender by reply e-mail and destroy all copies of the original 
message.
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


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:
>
>
> 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 the "P" in "Point type" to be
> directly above the "o" in "obsd" and "f" in "fitted".
>
> Is there any way to effect this?  Thanks.
>
> cheers,
>
> Rolf Turner
>
> --
> Honorary Research Fellow
> Department of Statistics
> University of Auckland
> Phone: +64-9-373-7599 ext. 88276
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


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 
> problem that is no longer a problem! I am new to this forum
>

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


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 Bernal  wrote:
>
> 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:
> !AIVDM,2,1,2,A,5EPtgd42CRtIADNU@N0 (all of this is a single message).
>
> Is there a way to make R automatically retrieve the latest file saved on
> the path, take each message and convert it to a number?
>
> Best regards,
>
> Paul
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


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])) v_lbs<-"0"
  else {
   if(x[i] < 0.51 && x[i] > 0) v_lbs[i]<-"<1"
   else v_lbs[i] <- format(round(x[i]), big.mark=",",scientific=FALSE)
 }
}
x
v_lbs

I think this gives you the "right" answer, as I have used 0.51 to
avoid the rounding problem at 0.5. I can see that the output is
feeding into something else, and an incorrect value at the end of your
calculations would be more difficult to track back. Bert's "ifelse" is
a more elegant way to do this, although not quote as easy for the
beginner to understand.

Jim

On Tue, Dec 24, 2019 at 7:33 AM Steinmann, Kimberly@CDPR
 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 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 
> appreciated. I am definitely an R newbie!
>
> current code that works:
>   v_lbs_list <- ""
>   for (j in 2:(p_num_years+1)) {
>  if (is.na(v_trends_lbs[i, j])) {
> v_lbs <- ' 0 '
>  } else if (v_trends_lbs[i, j] < 0.5) {
> v_lbs <- ' $<$1 '
>  } else {
> v_lbs <- format(round(v_trends_lbs[i, j]), big.mark=",", 
> scientific=FALSE)
>  }
>  v_lbs_list <- paste(v_lbs_list, ' & ', v_lbs)
>   }
>
> my attempt to add a >0 that gets an error  pointing at the & sign:
>   v_lbs_list <- ""
>   for (j in 2:(p_num_years+1)) {
>  if (is.na(v_trends_lbs[i, j])) {
> v_lbs <- ' 0 '
>  } else if (v_trends_lbs[i, j] < 0.5) & (v_trends_lbs[i, j] > 0) {
> v_lbs <- ' $<$1 '
>  } else {
> v_lbs <- format(round(v_trends_lbs[i, j]), big.mark=",", 
> scientific=FALSE)
>  }
>  v_lbs_list <- paste(v_lbs_list, ' & ', v_lbs)
>   }
>
> Thanks for any help!
>
>
> CONFIDENTIALITY NOTICE: This e-mail message, including a...{{dropped:10}}
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[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 the "P" in "Point type" to be 
directly above the "o" in "obsd" and "f" in "fitted".


Is there any way to effect this?  Thanks.

cheers,

Rolf Turner

--
Honorary Research Fellow
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276


xmpl.pdf
Description: Adobe PDF document
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[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 most understandable for me! Thanks!!!

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


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', format(round(x,2), big.mark=",",
scientific=FALSE) )
> x
 [1] "-2.00" "-1.75" "-1.50" "-1.25" "-1.00" "-0.75" "-0.50" "-0.25" " 0.00"
[10] "<1""<1""<1"" 1.00" " 1.25" " 1.50" " 1.75" " 2.00"

... or maybe not. You decide.

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 12: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 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
> appreciated. I am definitely an R newbie!
>
> current code that works:
>   v_lbs_list <- ""
>   for (j in 2:(p_num_years+1)) {
>  if (is.na(v_trends_lbs[i, j])) {
> v_lbs <- ' 0 '
>  } else if (v_trends_lbs[i, j] < 0.5) {
> v_lbs <- ' $<$1 '
>  } else {
> v_lbs <- format(round(v_trends_lbs[i, j]), big.mark=",",
> scientific=FALSE)
>  }
>  v_lbs_list <- paste(v_lbs_list, ' & ', v_lbs)
>   }
>
> my attempt to add a >0 that gets an error  pointing at the & sign:
>   v_lbs_list <- ""
>   for (j in 2:(p_num_years+1)) {
>  if (is.na(v_trends_lbs[i, j])) {
> v_lbs <- ' 0 '
>  } else if (v_trends_lbs[i, j] < 0.5) & (v_trends_lbs[i, j] > 0) {
> v_lbs <- ' $<$1 '
>  } else {
> v_lbs <- format(round(v_trends_lbs[i, j]), big.mark=",",
> scientific=FALSE)
>  }
>  v_lbs_list <- paste(v_lbs_list, ' & ', v_lbs)
>   }
>
> Thanks for any help!
>
>
> CONFIDENTIALITY NOTICE: This e-mail message, including a...{{dropped:10}}
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


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 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@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

-- 
Sent from my phone. Please excuse my brevity.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


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 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
> appreciated. I am definitely an R newbie!
>
> current code that works:
>   v_lbs_list <- ""
>   for (j in 2:(p_num_years+1)) {
>  if (is.na(v_trends_lbs[i, j])) {
> v_lbs <- ' 0 '
>  } else if (v_trends_lbs[i, j] < 0.5) {
> v_lbs <- ' $<$1 '
>  } else {
> v_lbs <- format(round(v_trends_lbs[i, j]), big.mark=",",
> scientific=FALSE)
>  }
>  v_lbs_list <- paste(v_lbs_list, ' & ', v_lbs)
>   }
>
> my attempt to add a >0 that gets an error  pointing at the & sign:
>   v_lbs_list <- ""
>   for (j in 2:(p_num_years+1)) {
>  if (is.na(v_trends_lbs[i, j])) {
> v_lbs <- ' 0 '
>  } else if (v_trends_lbs[i, j] < 0.5) & (v_trends_lbs[i, j] > 0) {
> v_lbs <- ' $<$1 '
>  } else {
> v_lbs <- format(round(v_trends_lbs[i, j]), big.mark=",",
> scientific=FALSE)
>  }
>  v_lbs_list <- paste(v_lbs_list, ' & ', v_lbs)
>   }
>
> Thanks for any help!
>
>
> CONFIDENTIALITY NOTICE: This e-mail message, including a...{{dropped:10}}
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


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 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.
You've made extremely valuable contributions to the R community.
And I look forward to seeing future progress...


Abs


On Tue, Dec 24, 2019 at 3:40 AM Jose Claudio Faria
 wrote:
>
> 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
> - https://sourceforge.net/projects/tinn-r/files/Tinn-R setup/6.1.1.3/
>
> Best,
> ///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\
> Jose Claudio Faria
> UESC/DCET/Brasil
> joseclaudio.faria at gmail.com
> Telefones:
> 55(73)3680.5545 - UESC
> 55(73)99966.9100 - VIVO
> ///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\
>
> If you have software to deal with statistics, you have arms;
> if you have good software, you have arms and legs;
> if you have software like R, you have arms, legs and wings...
> the height of your flight depends only on you!
>
>        [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
  

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[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@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[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 appreciated. I am 
definitely an R newbie!

current code that works:
  v_lbs_list <- ""
  for (j in 2:(p_num_years+1)) {
 if (is.na(v_trends_lbs[i, j])) {
v_lbs <- ' 0 '
 } else if (v_trends_lbs[i, j] < 0.5) {
v_lbs <- ' $<$1 '
 } else {
v_lbs <- format(round(v_trends_lbs[i, j]), big.mark=",", 
scientific=FALSE)
 }
 v_lbs_list <- paste(v_lbs_list, ' & ', v_lbs)
  }

my attempt to add a >0 that gets an error  pointing at the & sign:
  v_lbs_list <- ""
  for (j in 2:(p_num_years+1)) {
 if (is.na(v_trends_lbs[i, j])) {
v_lbs <- ' 0 '
 } else if (v_trends_lbs[i, j] < 0.5) & (v_trends_lbs[i, j] > 0) {
v_lbs <- ' $<$1 '
 } else {
v_lbs <- format(round(v_trends_lbs[i, j]), big.mark=",", 
scientific=FALSE)
 }
 v_lbs_list <- paste(v_lbs_list, ' & ', v_lbs)
  }

Thanks for any help!


CONFIDENTIALITY NOTICE: This e-mail message, including a...{{dropped:10}}

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


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.
You've made extremely valuable contributions to the R community.
And I look forward to seeing future progress...


Abs


On Tue, Dec 24, 2019 at 3:40 AM Jose Claudio Faria
 wrote:
>
> 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
> - https://sourceforge.net/projects/tinn-r/files/Tinn-R setup/6.1.1.3/
>
> Best,
> ///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\
> Jose Claudio Faria
> UESC/DCET/Brasil
> joseclaudio.faria at gmail.com
> Telefones:
> 55(73)3680.5545 - UESC
> 55(73)99966.9100 - VIVO
> ///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\
>
> If you have software to deal with statistics, you have arms;
> if you have good software, you have arms and legs;
> if you have software like R, you have arms, legs and wings...
> the height of your flight depends only on you!
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


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 question was not a reproducible example and you got most complicated
answer. Apply entourage is kind of dark art in R, so I offered different
solutions, and hope that my answer helped.

Being medic too, I understand your pain, but for the star I suggest Rcmdr.


Regards,


Miloš


On Mon, 23 Dec 2019 at 20:36, Bert Gunter  wrote:

> 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
>median   IQR
> 0.5469662 0.4548506
> --
> d$w: b
>median   IQR
> 0.6860975 0.3456893
>
>
> -- Bert
> 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 9:15 AM Medic  wrote:
>
> > 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?
> > First I need to split mydata$var by mydata$sex, and then take:
> >
> > summary (for male)
> > and
> > summary (for female)
> >
> > That's all I want
> >
> > Bert,
> > ave(mydata$var, madata$sex, FUN=median)
> > gives me:
> > [1] 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6
> > 5.6 5.6 5.6 5.6
> > [21] 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0
> > 6.0 6.0 6.0 6.0
> > What is it?
> > It is an endless(???) repetition of the median.
> > Moreover, there is no ICR.
> >
> > Jeff,
> > your constructions are too complicated for me
> > ===
> > P.S. Such simple thing and so difficult?! (I begin think about the
> Excel.)
> >
> > __
> > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> > http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


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
   median   IQR
0.5469662 0.4548506
--
d$w: b
   median   IQR
0.6860975 0.3456893


-- Bert
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 9:15 AM Medic  wrote:

> 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?
> First I need to split mydata$var by mydata$sex, and then take:
>
> summary (for male)
> and
> summary (for female)
>
> That's all I want
>
> Bert,
> ave(mydata$var, madata$sex, FUN=median)
> gives me:
> [1] 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6
> 5.6 5.6 5.6 5.6
> [21] 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0
> 6.0 6.0 6.0 6.0
> What is it?
> It is an endless(???) repetition of the median.
> Moreover, there is no ICR.
>
> Jeff,
> your constructions are too complicated for me
> ===
> P.S. Such simple thing and so difficult?! (I begin think about the Excel.)
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


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 + Kruskal-Wallis
 data=sn.l.v2.t0)
summary(tab1,text=TRUE) #output as txt to console
write2word(tab1,"tab1.docx", pfootnote=TRUE) #save as formatted word table

or even simpler using Rcmdr - Statistics - Numerical summaries and tha
choose summarize by groups

Milos

On Mon, 23 Dec 2019 at 15:57, Medic  wrote:

> 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 UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


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 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 10:14 AM Paul Bernal  wrote:

> 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:
> !AIVDM,2,1,2,A,5EPtgd42CRtIADNU@N0 `0?0kk3k`40CP,0*2D,1532995201
> (all of this is a single message).
>
> Is there a way to make R automatically retrieve the latest file saved on
> the path, take each message and convert it to a number?
>
> Best regards,
>
> Paul
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[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:
!AIVDM,2,1,2,A,5EPtgd42CRtIADNU@N0https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


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 finite aim

...and you can either use lapply() on the list returned by split() or
tapply() to both split the dataset into groups and call summary() on
each in one expression. See ?tapply and example(tapply) for more info.

-- 
Best regards,
Ivan

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


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 wrote:

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 getting NAs:

log10(0)
[1] -Inf

Another possibility is that the values used in the initial calculation
have been read in as factors.

Jim

On Mon, Dec 23, 2019 at 10:55 AM Neha gupta 
wrote:


Hi Jim

The objective function is passed to san_res where we have defined the 4

parameters of gbm and the values are initialized in san_res.


The output variable price has only three values: 0, 1, 2 (like

categorical values), so someone told me try to remove the log10 from the
price.






[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



--
Michael
http://www.dewey.myzen.co.uk/home.html

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[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?
First I need to split mydata$var by mydata$sex, and then take:

summary (for male)
and
summary (for female)

That's all I want

Bert,
ave(mydata$var, madata$sex, FUN=median)
gives me:
[1] 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6
5.6 5.6 5.6 5.6
[21] 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0
6.0 6.0 6.0 6.0
What is it?
It is an endless(???) repetition of the median.
Moreover, there is no ICR.

Jeff,
your constructions are too complicated for me
===
P.S. Such simple thing and so difficult?! (I begin think about the Excel.)

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


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
>
>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 UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

-- 
Sent from my phone. Please excuse my brevity.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


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 about all of them (read the Posting Guide).
>
> That said, this question does not seem like the use of shiny is
> necessarily relevant because shiny itself does not define nor support calls
> to APIs. That is, I am not convinced that a shiny support forum is the
> right place to get an answer.
>
> Given this, you (OP) may be able to make a reproducible example in R
> [1][2][3] that does not involve shiny and we could at least help identify
> which forum should be consulted. Of course this reprex would be useful to
> post in whatever forum appears to be relevant, or it could help you to
> understand the problem well enough to solve it yourself.
>
> [1]
> http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
>
> [2] http://adv-r.had.co.nz/Reproducibility.html
>
> [3] https://cran.r-project.org/web/packages/reprex/index.html (read the
> vignette)
>
>
> On December 22, 2019 3:44:19 PM PST, Bert Gunter 
> wrote:
> >I think this is the wrong list. Shiny is an RStudio app and is not part
> >of
> >R. You need to post on the RStudio site.
> >
> >
> >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 Sun, Dec 22, 2019 at 3:15 PM Vinish Vishwanathan
> >
> >wrote:
> >
> >> Hello All,
> >>
> >> I just subscribed to this mail list and needed some help on an
> >ongoing
> >> issue with details stated below
> >>
> >> Issue: An API call from R Shiny App to a server in Cloud fails with
> >error:
> >>
> >> Error:*  SSL read: error::lib(0):func(0):reason(0), errno 110
> >> *  Connection died, retrying a fresh connect
> >> *  Closing connection 18
> >>
> >> Details: I am using the httr to do a POST call to the API.
> >>
> >> Help Needed: Anyone from experience calling APIs from R, if can help
> >to
> >> identify the cause for the error.
> >>
> >> My feeling is, its because of http Keep Alive and anyone parameter of
> >it
> >> which is not respected/expired, but not sure.
> >>
> >> --
> >> Regards
> >> Vinish Viswanathan
> >>
> >> [[alternative HTML version deleted]]
> >>
> >> __
> >> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> >> https://stat.ethz.ch/mailman/listinfo/r-help
> >> PLEASE do read the posting guide
> >> http://www.R-project.org/posting-guide.html
> >> and provide commented, minimal, self-contained, reproducible code.
> >>
> >
> >   [[alternative HTML version deleted]]
> >
> >__
> >R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> >https://stat.ethz.ch/mailman/listinfo/r-help
> >PLEASE do read the posting guide
> >http://www.R-project.org/posting-guide.html
> >and provide commented, minimal, self-contained, reproducible code.
>
> --
> Sent from my phone. Please excuse my brevity.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


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
>
> 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 UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[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 UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[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
- https://sourceforge.net/projects/tinn-r/files/Tinn-R setup/6.1.1.3/

Best,
///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\
Jose Claudio Faria
UESC/DCET/Brasil
joseclaudio.faria at gmail.com
Telefones:
55(73)3680.5545 - UESC
55(73)99966.9100 - VIVO
///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\

If you have software to deal with statistics, you have arms;
if you have good software, you have arms and legs;
if you have software like R, you have arms, legs and wings...
the height of your flight depends only on you!

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


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 shiny itself does not define nor support calls to APIs. That 
is, I am not convinced that a shiny support forum is the right place to get an 
answer.

Given this, you (OP) may be able to make a reproducible example in R [1][2][3] 
that does not involve shiny and we could at least help identify which forum 
should be consulted. Of course this reprex would be useful to post in whatever 
forum appears to be relevant, or it could help you to understand the problem 
well enough to solve it yourself.

[1] 
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example

[2] http://adv-r.had.co.nz/Reproducibility.html

[3] https://cran.r-project.org/web/packages/reprex/index.html (read the 
vignette) 


On December 22, 2019 3:44:19 PM PST, Bert Gunter  wrote:
>I think this is the wrong list. Shiny is an RStudio app and is not part
>of
>R. You need to post on the RStudio site.
>
>
>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 Sun, Dec 22, 2019 at 3:15 PM Vinish Vishwanathan
>
>wrote:
>
>> Hello All,
>>
>> I just subscribed to this mail list and needed some help on an
>ongoing
>> issue with details stated below
>>
>> Issue: An API call from R Shiny App to a server in Cloud fails with
>error:
>>
>> Error:*  SSL read: error::lib(0):func(0):reason(0), errno 110
>> *  Connection died, retrying a fresh connect
>> *  Closing connection 18
>>
>> Details: I am using the httr to do a POST call to the API.
>>
>> Help Needed: Anyone from experience calling APIs from R, if can help
>to
>> identify the cause for the error.
>>
>> My feeling is, its because of http Keep Alive and anyone parameter of
>it
>> which is not respected/expired, but not sure.
>>
>> --
>> Regards
>> Vinish Viswanathan
>>
>> [[alternative HTML version deleted]]
>>
>> __
>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>   [[alternative HTML version deleted]]
>
>__
>R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

-- 
Sent from my phone. Please excuse my brevity.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


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 getting NAs:
>
> log10(0)
> [1] -Inf
>
> Another possibility is that the values used in the initial calculation
> have been read in as factors.
>
> Jim
>
> On Mon, Dec 23, 2019 at 10:55 AM Neha gupta 
> wrote:
> >
> > Hi Jim
> >
> > The objective function is passed to san_res where we have defined the 4
> parameters of gbm and the values are initialized in san_res.
> >
> > The output variable price has only three values: 0, 1, 2 (like
> categorical values), so someone told me try to remove the log10 from the
> price.
> >
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.