Re: [R] annotate

2023-10-05 Thread Paul Murrell

Hi

You could use the 'gggrid' package, which gets you access to other 
coordinate systems.  For example, the following places the text labels 
2mm above the (centres of the) data points (bottom-justified) ...



library(gggrid)

labels <- function(data, coords) {
textGrob(data$label,
 coords$x,
 unit(coords$y, "npc") + unit(2, "mm"),
 just="bottom")
}

ggplot(faithful, aes(x = eruptions, y = waiting)) +
geom_point(shape=21, size=3, fill="orange") +
geom_hline(yintercept = 92) +
grid_panel(labels,
   data = above_92,
   mapping = aes(x = eruptions, y = waiting,
 label = waiting)) +
theme_cowplot()


Hope that helps.

Paul

On 5/10/2023 8:34 am, Subia Thomas OI-US-LIV5 wrote:

Colleagues,

I wish to create y-data labels which meet a criterion.

Here is my reproducible code.
library(dplyr)
library(ggplot2)
library(cowplot)

above_92 <- filter(faithful,waiting>92)

ggplot(faithful,aes(x=eruptions,y=waiting))+
geom_point(shape=21,size=3,fill="orange")+
theme_cowplot()+
geom_hline(yintercept = 92)+
annotate(geom="text",x=above_92$eruptions,y=above_92$waiting+2,label=above_92$waiting)

A bit of trial and error is required to figure out what number to add or 
subtract to above_92$waiting.


Is there a more efficient way to do this?


Thomas Subia
Lean Six Sigma Senior Practitioner

DRÄXLMAIER Group
DAA Draexlmaier Automotive of America LLC

mailto:thomas.su...@draexlmaier.com
http://www.draexlmaier.com 



"Nous croyons en Dieu.
Tous les autres doivent apporter des données.
Edward Deming


Public: All rights reserved. Distribution to third parties allowed.

__
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.


--
Dr Paul Murrell
Te Kura Tatauranga | Department of Statistics
Waipapa Taumata Rau | The University of Auckland
Private Bag 92019, Auckland, New Zealand
64 9 3737599 x85392
p...@stat.auckland.ac.nz
www.stat.auckland.ac.nz/~paul/

__
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 issue / No buffer space available

2023-10-05 Thread Rui Barradas

Às 21:28 de 04/10/2023, Ohad Oren, MD escreveu:

Hello,

I keep getting the following message about 'no buffer space available'. I
am using R studio via connection to server. I verified that the connection
to the server is good.

2023-10-04T20:26:25.698193Z [rsession-oo968] ERROR system error 105
(No buffer space available) [host: localhost, uri: /log_message, path:
/var/run/rstudio-server/rstudio-rserver/rserver-monitor.socket];
OCCURRED AT void
rstudio::core::http::LocalStreamAsyncClient::handleConnect(const
rstudio_boost::system::error_code&)
src/cpp/session/SessionModuleContext.cpp:124


Will appreciate your help!

Ohad

[[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.

Hello,

RStudio is an IDE for R, not R itself.
That is a RStudio error and RStudio technical support [1] is better 
suited to solve your problem.


[1] https://community.rstudio.com/

Hope this helps,

Rui Barradas


--
Este e-mail foi analisado pelo software antivírus AVG para verificar a presença 
de vírus.
www.avg.com

__
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 issue / No buffer space available

2023-10-05 Thread Ben Bolker
This looks like an RStudio issue; it might be better to post the question
on their forum

On Thu, Oct 5, 2023, 7:43 AM Ohad Oren, MD  wrote:

> Hello,
>
> I keep getting the following message about 'no buffer space available'. I
> am using R studio via connection to server. I verified that the connection
> to the server is good.
>
> 2023-10-04T20:26:25.698193Z [rsession-oo968] ERROR system error 105
> (No buffer space available) [host: localhost, uri: /log_message, path:
> /var/run/rstudio-server/rstudio-rserver/rserver-monitor.socket];
> OCCURRED AT void
> rstudio::core::http::LocalStreamAsyncClient::handleConnect(const
> rstudio_boost::system::error_code&)
> src/cpp/session/SessionModuleContext.cpp:124
>
>
> Will appreciate your help!
>
> Ohad
>
> [[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] R issue / No buffer space available

2023-10-05 Thread Ohad Oren, MD
Hello,

I keep getting the following message about 'no buffer space available'. I
am using R studio via connection to server. I verified that the connection
to the server is good.

2023-10-04T20:26:25.698193Z [rsession-oo968] ERROR system error 105
(No buffer space available) [host: localhost, uri: /log_message, path:
/var/run/rstudio-server/rstudio-rserver/rserver-monitor.socket];
OCCURRED AT void
rstudio::core::http::LocalStreamAsyncClient::handleConnect(const
rstudio_boost::system::error_code&)
src/cpp/session/SessionModuleContext.cpp:124


Will appreciate your help!

Ohad

[[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] Jim Lemon RIP

2023-10-05 Thread Dr Kay Quagraine
Dear Friends,

Absolutely gutted to hear of the passing of Jim, he was always an excellent 
contributor and he will be missed. My sincerest sympathies to the family of Jim.

May He Rest In Peace.

--
Kwesi A. Quagraine (PhD)
PDR-Fellow, Climate System Analysis Group (CSAG)
University of Cape Town, South Africa
Website: https://kayquagraine.my.canva.site/
Socials:  Twitter
Tels:   +27 21 650 1563  | +233 50 781 2543

Let’s save our world, there is no PLANET B - Anonymous.
On Oct 5, 2023 at 5:35 AM +, Rui Barradas , wrote:
>
> My sympathies for your loss.
> Jim Lemon was a dedicated contributor to the R community and his answers
> were always welcome.
> Jim will be missed.
>
> Rui Barradas
>
> Às 23:36 de 04/10/2023, Jim Lemon escreveu:
> > Hello,
> > I am very sad to let you know that my husband Jim died on 18th September. I
> > apologise for not letting you know earlier but I had trouble finding the
> > password for his phone.
> > Kind regards,
> > Juel
> >
>
>
>
>
> --
> Este e-mail foi analisado pelo software antivírus AVG para verificar a 
> presença de vírus.
> www.avg.com
>
> __
> 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] Jim Lemon RIP

2023-10-05 Thread Edjabou Vincent
Sorry to hear that! He has been very active answering questions on R. May
his soul rest in peace.

Best regards
Vincent

tor. 5. okt. 2023 06.03 skrev roslinazairimah zakaria :

> Hi,
> Jim is always very helpful. So sorry to hear that.
>
> On Thu, Oct 5, 2023, 13:45 Ogbos Okike  wrote:
>
> > I'm yet to accept this. I have sent an email to his wife.
> > Ogbos.
> >
> > On Thu, Oct 5, 2023, 06:35 Rui Barradas  wrote:
> >
> > >
> > > My sympathies for your loss.
> > > Jim Lemon was a dedicated contributor to the R community and his
> answers
> > > were always welcome.
> > > Jim will be missed.
> > >
> > > Rui Barradas
> > >
> > > Às 23:36 de 04/10/2023, Jim Lemon escreveu:
> > > > Hello,
> > > > I am very sad to let you know that my husband Jim died on 18th
> > > September. I
> > > > apologise for not letting you know earlier but I had trouble finding
> > the
> > > > password for his phone.
> > > > Kind regards,
> > > > Juel
> > > >
> > >
> > >
> > >
> > >
> > > --
> > > Este e-mail foi analisado pelo software antivírus AVG para verificar a
> > > presença de vírus.
> > > www.avg.com
> > >
> > > __
> > > 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.
>

[[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] annotate

2023-10-05 Thread Rui Barradas

Às 20:34 de 04/10/2023, Subia Thomas OI-US-LIV5 escreveu:

Colleagues,

I wish to create y-data labels which meet a criterion.

Here is my reproducible code.
library(dplyr)
library(ggplot2)
library(cowplot)

above_92 <- filter(faithful,waiting>92)

ggplot(faithful,aes(x=eruptions,y=waiting))+
   geom_point(shape=21,size=3,fill="orange")+
   theme_cowplot()+
   geom_hline(yintercept = 92)+
   
annotate(geom="text",x=above_92$eruptions,y=above_92$waiting+2,label=above_92$waiting)

A bit of trial and error is required to figure out what number to add or 
subtract to above_92$waiting.

Is there a more efficient way to do this?


Thomas Subia
Lean Six Sigma Senior Practitioner

DRÄXLMAIER Group
DAA Draexlmaier Automotive of America LLC

mailto:thomas.su...@draexlmaier.com
http://www.draexlmaier.com

"Nous croyons en Dieu.
Tous les autres doivent apporter des données.
Edward Deming


Public: All rights reserved. Distribution to third parties allowed.

__
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.

Hdello,

Yes, there is an automatic way of doing this.
Use a new data set in geom_text or annotate. Below I use geom_text.
Then vjust will take care of the labels placement.




library(dplyr)
library(ggplot2)
library(cowplot)

above_92 <- filter(faithful, waiting > 92)

ggplot(faithful, aes(x = eruptions, y = waiting)) +
  geom_point(shape=21,size=3,fill="orange") +
  geom_hline(yintercept = 92) +
  # use a new data argument here
  geom_text(
data = above_92,
mapping = aes(x = eruptions, y = waiting, label = waiting),
vjust = -1
  ) +
  theme_cowplot()




Hope this helps,

Rui Barradas


--
Este e-mail foi analisado pelo software antivírus AVG para verificar a presença 
de vírus.
www.avg.com

__
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] annotate

2023-10-05 Thread Eric Berger
Another approach (still seems to require experimentation to get the value
'2') would be to replace the annotate() with

geom_text(data=above_92, aes(x=eruptions,y=waiting, label=waiting),
nudge_y=2)

At least this makes clear the reason for the magic number '2' in the code.

For details see
?geom_text


On Thu, Oct 5, 2023 at 10:38 AM Subia Thomas OI-US-LIV5 <
thomas.su...@draexlmaier.com> wrote:

> Colleagues,
>
> I wish to create y-data labels which meet a criterion.
>
> Here is my reproducible code.
> library(dplyr)
> library(ggplot2)
> library(cowplot)
>
> above_92 <- filter(faithful,waiting>92)
>
> ggplot(faithful,aes(x=eruptions,y=waiting))+
>   geom_point(shape=21,size=3,fill="orange")+
>   theme_cowplot()+
>   geom_hline(yintercept = 92)+
>
> annotate(geom="text",x=above_92$eruptions,y=above_92$waiting+2,label=above_92$waiting)
>
> A bit of trial and error is required to figure out what number to add or
> subtract to above_92$waiting.
>
> Is there a more efficient way to do this?
>
>
> Thomas Subia
> Lean Six Sigma Senior Practitioner
>
> DRÄXLMAIER Group
> DAA Draexlmaier Automotive of America LLC
>
> mailto:thomas.su...@draexlmaier.com
> http://www.draexlmaier.com
>
> "Nous croyons en Dieu.
> Tous les autres doivent apporter des données.
> Edward Deming
>
>
> Public: All rights reserved. Distribution to third parties allowed.
>
> __
> 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] annotate

2023-10-05 Thread Subia Thomas OI-US-LIV5
Colleagues,

I wish to create y-data labels which meet a criterion.

Here is my reproducible code.
library(dplyr)
library(ggplot2)
library(cowplot)

above_92 <- filter(faithful,waiting>92)

ggplot(faithful,aes(x=eruptions,y=waiting))+
  geom_point(shape=21,size=3,fill="orange")+
  theme_cowplot()+
  geom_hline(yintercept = 92)+
  
annotate(geom="text",x=above_92$eruptions,y=above_92$waiting+2,label=above_92$waiting)

A bit of trial and error is required to figure out what number to add or 
subtract to above_92$waiting.

Is there a more efficient way to do this?


Thomas Subia
Lean Six Sigma Senior Practitioner

DRÄXLMAIER Group
DAA Draexlmaier Automotive of America LLC

mailto:thomas.su...@draexlmaier.com
http://www.draexlmaier.com

"Nous croyons en Dieu.
Tous les autres doivent apporter des données.
Edward Deming


Public: All rights reserved. Distribution to third parties allowed.

__
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] download.file strict certificate revocation check

2023-10-05 Thread John Neset
Ivan,
SSL connect error & we definitely have MITM doing certificate interference.
No change with True or False with R_LIBCURL_SSL_REVOKE_BEST_EFFORT
Environment variable results should be attached.

-Original Message-
From: Ivan Krylov 
Sent: Wednesday, October 4, 2023 8:52 AM
To: John Neset 
Cc: r-help@R-project.org
Subject: Re: [R] download.file strict certificate revocation check

WARNING: This is an external email.
Do not click links or open attachments unless you recognize the sender and know 
the content is safe.



В Wed, 4 Oct 2023 13:09:47 +
John Neset  пишет:

> Trying to do this, reference FAQ-
> 2.18 The Internet download functions fail.
> (c) A MITM proxy (typically in enterprise environments) makes it
> impossible to validate that certificates haven't been revoked. One can
> switch to only best effort revocation checks via an environment
> variable: see ?download.file.

Here's what help(download.file) has to say:

>> On Windows with ‘method = "libcurl"’, when R was linked with
>> ‘libcurl’ with ‘Schannel’ enabled, the connection fails if it
>> cannot be established that the certificate has not been revoked.
>> Some MITM proxies present particularly in corporate environments
>> do not work with this behavior. It can be changed by setting
>> environment variable ‘R_LIBCURL_SSL_REVOKE_BEST_EFFORT’ to
>> ‘TRUE’, with the consequence of reducing security.

Does it help to Sys.setenv(...) this environment variable before downloading? 
If not, please provide your sessionInfo() and the full error message.

--
Best regards,
Ivan
Confidentiality Notice - This communication and any attachments are for the 
sole use of the intended recipient(s) and may contain confidential and 
privileged information. Any unauthorized review, use, disclosure, distribution 
or copying is prohibited. If you are not the intended recipient(s), please 
contact the sender by replying to this e-mail and destroy/delete all copies of 
this e-mail 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] Jim Lemon RIP

2023-10-05 Thread roslinazairimah zakaria
Hi,
Jim is always very helpful. So sorry to hear that.

On Thu, Oct 5, 2023, 13:45 Ogbos Okike  wrote:

> I'm yet to accept this. I have sent an email to his wife.
> Ogbos.
>
> On Thu, Oct 5, 2023, 06:35 Rui Barradas  wrote:
>
> >
> > My sympathies for your loss.
> > Jim Lemon was a dedicated contributor to the R community and his answers
> > were always welcome.
> > Jim will be missed.
> >
> > Rui Barradas
> >
> > Às 23:36 de 04/10/2023, Jim Lemon escreveu:
> > > Hello,
> > > I am very sad to let you know that my husband Jim died on 18th
> > September. I
> > > apologise for not letting you know earlier but I had trouble finding
> the
> > > password for his phone.
> > > Kind regards,
> > > Juel
> > >
> >
> >
> >
> >
> > --
> > Este e-mail foi analisado pelo software antivírus AVG para verificar a
> > presença de vírus.
> > www.avg.com
> >
> > __
> > 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.