Re: [R] Using gutenbergr with a firewall

2018-02-13 Thread Jeff Newmiller
Saying "a firewall" is like saying "a weapon". Some firewalls are much more 
strict than others, and yours may be different than any someone here might have 
encountered. You might also be having trouble with anti virus software.
-- 
Sent from my phone. Please excuse my brevity.

On February 13, 2018 10:55:40 PM PST, Patrick Connolly 
 wrote:
>I can use the gutenberg_download() function in the gutenbergr package
>on a computer that doeson't use a firewall, but on an almost identical
>installation that is behind a firewall, nothing happens, not even a
>time-out.
>
>Has anyone succeeded in using gutenberg_download() successfully with a
>firewall?  I tried raising an issue at
>https://github.com/ropenscilabs/gutenbergr/issues/17 with no usable
>response.  I also tried contacting the maintainer but got no response.
>
>The firewall might be a red-herring, but I thought it worthwhile
>eliminating it as a factor.
>
>I would welcome any information on anyone else's experience.
>
>Thank you.

__
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] Using gutenbergr with a firewall

2018-02-13 Thread Patrick Connolly
I can use the gutenberg_download() function in the gutenbergr package
on a computer that doeson't use a firewall, but on an almost identical
installation that is behind a firewall, nothing happens, not even a
time-out.

Has anyone succeeded in using gutenberg_download() successfully with a
firewall?  I tried raising an issue at
https://github.com/ropenscilabs/gutenbergr/issues/17 with no usable
response.  I also tried contacting the maintainer but got no response.

The firewall might be a red-herring, but I thought it worthwhile
eliminating it as a factor.

I would welcome any information on anyone else's experience.

Thank you.

-- 
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.   
   ___Patrick Connolly   
 {~._.~}   Great minds discuss ideas
 _( Y )_ Average minds discuss events 
(:_~*~_:)  Small minds discuss people  
 (_)-(_)  . Eleanor Roosevelt
  
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.

__
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] LSmeans and lsmeans

2018-02-13 Thread Pius Mwansa
Thanks Bert.

 

From: Bert Gunter [mailto:bgunter.4...@gmail.com] 
Sent: Tuesday, February 13, 2018 4:42 PM
To: Pius Mwansa 
Cc: R-help 
Subject: Re: [R] LSmeans and lsmeans

 

A cursory reading indicates that they are identical; but others more 
knowledgeable than I need to confirm or deny this.

-- 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 Tue, Feb 13, 2018 at 3:38 PM, Pius Mwansa mailto:pmwa...@shaw.ca> > wrote:

It is in the doBy package.

 

Thanks

 

From: Bert Gunter [mailto:bgunter.4...@gmail.com 
 ] 
Sent: Tuesday, February 13, 2018 4:32 PM


To: Pius Mwansa mailto:pmwa...@shaw.ca> >
Cc: R-help mailto:r-help@r-project.org> >
Subject: Re: [R] LSmeans and lsmeans

 

Always cc the list unless there is good reason to keep your reply private.

There is no LSmeans() function in the lsmeans package.

Cheers,

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 Tue, Feb 13, 2018 at 3:20 PM, Pius Mwansa mailto:pmwa...@shaw.ca> > wrote:

They are in the lsmeans package.

 

Pius

 

From: Bert Gunter [mailto:bgunter.4...@gmail.com 
 ] 
Sent: Tuesday, February 13, 2018 4:16 PM
To: Pius Mwansa mailto:pmwa...@shaw.ca> >
Cc: R-help mailto:r-help@r-project.org> >
Subject: Re: [R] LSmeans and lsmeans

 

In what packages?

-- 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 Tue, Feb 13, 2018 at 11:17 AM, Pius Mwansa mailto:pmwa...@shaw.ca> > wrote:

Is there a difference between LSmeans and lsmeans functions in R?

Thanks,

Pius

__
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] LSmeans and lsmeans

2018-02-13 Thread Pius Mwansa
It is in the doBy package.

 

Thanks

 

From: Bert Gunter [mailto:bgunter.4...@gmail.com] 
Sent: Tuesday, February 13, 2018 4:32 PM
To: Pius Mwansa 
Cc: R-help 
Subject: Re: [R] LSmeans and lsmeans

 

Always cc the list unless there is good reason to keep your reply private.

There is no LSmeans() function in the lsmeans package.

Cheers,

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 Tue, Feb 13, 2018 at 3:20 PM, Pius Mwansa mailto:pmwa...@shaw.ca> > wrote:

They are in the lsmeans package.

 

Pius

 

From: Bert Gunter [mailto:bgunter.4...@gmail.com 
 ] 
Sent: Tuesday, February 13, 2018 4:16 PM
To: Pius Mwansa mailto:pmwa...@shaw.ca> >
Cc: R-help mailto:r-help@r-project.org> >
Subject: Re: [R] LSmeans and lsmeans

 

In what packages?

-- 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 Tue, Feb 13, 2018 at 11:17 AM, Pius Mwansa mailto:pmwa...@shaw.ca> > wrote:

Is there a difference between LSmeans and lsmeans functions in R?

Thanks,

Pius

__
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] Fleming-Harrington weighted log rank test

2018-02-13 Thread array chip via R-help
Hi all, 

The survdiff() from survival package has an argument "rho" that implements 
Fleming-Harrington weighted long rank test. 

But according to several sources including "survminer" package 
(https://cran.r-project.org/web/packages/survminer/vignettes/Specifiying_weights_in_log-rank_comparisons.html),
 Fleming-Harrington weighted log-rank test should have 2 parameters "p" and "q" 
to control the weighting for earlier vs later times in the follow-up.

For example, setting rho=1 in survdiff() uses the Peto-Peto modification of 
Gehan-Wilcox weights, which I can confirm by setting p=1 & 1=0 in comp() from 
survminer package. similarly rho=0 is equivalent to p=0 & q=0

I am interested in putting more weights on survival difference in later 
follow-up time. According to comp() from survminer package, that would set p=0 
& q=1 for Fleming-Harrington weights. 

My question is how I can do the same by setting certain values for "rho" in the 
regular survival() function?

Thank you,

John

__
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] LSmeans and lsmeans

2018-02-13 Thread Bert Gunter
A cursory reading indicates that they are identical; but others more
knowledgeable than I need to confirm or deny this.

-- 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 Tue, Feb 13, 2018 at 3:38 PM, Pius Mwansa  wrote:

> It is in the doBy package.
>
>
>
> Thanks
>
>
>
> *From:* Bert Gunter [mailto:bgunter.4...@gmail.com]
> *Sent:* Tuesday, February 13, 2018 4:32 PM
>
> *To:* Pius Mwansa 
> *Cc:* R-help 
> *Subject:* Re: [R] LSmeans and lsmeans
>
>
>
> Always cc the list unless there is good reason to keep your reply private.
>
> There is no LSmeans() function in the lsmeans package.
>
> Cheers,
>
> 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 Tue, Feb 13, 2018 at 3:20 PM, Pius Mwansa  wrote:
>
> They are in the lsmeans package.
>
>
>
> Pius
>
>
>
> *From:* Bert Gunter [mailto:bgunter.4...@gmail.com]
> *Sent:* Tuesday, February 13, 2018 4:16 PM
> *To:* Pius Mwansa 
> *Cc:* R-help 
> *Subject:* Re: [R] LSmeans and lsmeans
>
>
>
> In what packages?
>
> -- 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 Tue, Feb 13, 2018 at 11:17 AM, Pius Mwansa  wrote:
>
> Is there a difference between LSmeans and lsmeans functions in R?
>
> Thanks,
>
> Pius
>
> __
> 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] LSmeans and lsmeans

2018-02-13 Thread Bert Gunter
Always cc the list unless there is good reason to keep your reply private.

There is no LSmeans() function in the lsmeans package.

Cheers,
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 Tue, Feb 13, 2018 at 3:20 PM, Pius Mwansa  wrote:

> They are in the lsmeans package.
>
>
>
> Pius
>
>
>
> *From:* Bert Gunter [mailto:bgunter.4...@gmail.com]
> *Sent:* Tuesday, February 13, 2018 4:16 PM
> *To:* Pius Mwansa 
> *Cc:* R-help 
> *Subject:* Re: [R] LSmeans and lsmeans
>
>
>
> In what packages?
>
> -- 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 Tue, Feb 13, 2018 at 11:17 AM, Pius Mwansa  wrote:
>
> Is there a difference between LSmeans and lsmeans functions in R?
>
> Thanks,
>
> Pius
>
> __
> 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] LSmeans and lsmeans

2018-02-13 Thread Bert Gunter
In what packages?

-- 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 Tue, Feb 13, 2018 at 11:17 AM, Pius Mwansa  wrote:

> Is there a difference between LSmeans and lsmeans functions in R?
>
> Thanks,
>
> Pius
>
> __
> 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] Tukey and extracting letters in multcomp

2018-02-13 Thread Rachel S Smith
Hi Lauren, 

Did you ever receive an answer on this? I’ve been having the same errors, and 
am stumped, so I’d love to hear how you sorted this out with your models. 
Thanks for your help!

Cheers, 

Rachel

--
Rachel Smith
PhD Candidate
Odum School of Ecology
University of Georgia
Athens, GA 30602
__
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] Best Optimization Routines

2018-02-13 Thread JamesRyan(Ryan James)/E&P North America Business Division
I have a set of data, the production of oil from a well.  And an equation to 
predict that forecast.  

The equation requires 5 input variables which are real numbers with upper and 
lower bounds, 1 input variable which must be an integer and 1 input variable 
which can be 1 of 2 string variables.  

What is the best optimization routine (I am using nlminb) to use in R to 
determine the best set of inputs and how to I handle the integer and string 
inputs when optimizing?  

I have attached a plot of what I am trying to accomplish as well as my sample 
code.  

Thanks,

Ryan




Rplot.pdf
Description: Rplot.pdf
__
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] LSmeans and lsmeans

2018-02-13 Thread Pius Mwansa
Is there a difference between LSmeans and lsmeans functions in R?

Thanks,

Pius

__
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] Suppress horizontal mean line in beanplot()

2018-02-13 Thread Bert Gunter
The package docs seem to provide your answer -- you just need to read them
more carefully:
See the "what" argument of ?beanplot.
Setting the first entry of the vector to 0 would seem to suppress the
overall mean.

Apologies if I've misread/misinterpreted.


Cheers,
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 Tue, Feb 13, 2018 at 10:31 AM, Samuel Knapp  wrote:

> Hi,
>
> I would like to use the beanplot() function from the beanplot package.
> Unfortunately, I can't find out how to suppress the dashed horizontal line,
> that shows the overall mean.
>
> In the help I've found the argument "overallline", but it only allows for
> "mean" or "median" .
>
> I have tried overallline = F, overallline="n", and overallline="", but
> without success.
>
> Strangely, I could also not find any suggestions on the internet.
>
> Does anybody know how to do this?
>
> Thanks,
>
> Samuel
>
> ## Example code using the dataset InsectSprays from datasets package
>
> library(beanplot)
>
> beanplot(count ~ spray, data = InsectSprays)
>
> # How to remove the dashed horizonal line?
>
>
>
> --
> Samuel Knapp
>
> Lehrstuhl für Pflanzenernährung
> Technische Universität München
> (Chair of Plant Nutrition
> Technical University of Munich)
>
> Emil-Ramann-Strasse 2
> D-85354 Freising
>
> Tel. +49 8161 71-3578
> samuel.kn...@tum.de
> www.researchgate.net/profile/Samuel_Knapp
>
> __
> 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/posti
> ng-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] Suppress horizontal mean line in beanplot()

2018-02-13 Thread Mohammad Tanvir Ahamed via R-help
hi, 

Check this 

beanplot(count ~ spray, data = InsectSprays, what = c(FALSE, TRUE, TRUE, TRUE))

>From R function help : 
what :  a vector of four booleans describing what to plot. In the following 
order, these booleans stand for the total average line, the beans, the bean 
average, and the beanlines. For example, what=c(0,0,0,1) produces a stripchart


ggplot can be helpful

library(ggplot2)
p <- ggplot(InsectSprays, aes(factor(spray), count, fill=factor(spray) ))+ 
geom_violin()
print(p)

Regards.
Tanvir Ahamed 
Stockholm, Sweden |  mashra...@yahoo.com 






On Tuesday, February 13, 2018, 7:32:22 PM GMT+1, Samuel Knapp 
 wrote: 





Hi,

I would like to use the beanplot() function from the beanplot package. 
Unfortunately, I can't find out how to suppress the dashed horizontal 
line, that shows the overall mean.

In the help I've found the argument "overallline", but it only allows 
for "mean" or "median" .

I have tried overallline = F, overallline="n", and overallline="", but 
without success.

Strangely, I could also not find any suggestions on the internet.

Does anybody know how to do this?

Thanks,

Samuel

## Example code using the dataset InsectSprays from datasets package

library(beanplot)

beanplot(count ~ spray, data = InsectSprays)

# How to remove the dashed horizonal line?



-- 
Samuel Knapp

Lehrstuhl für Pflanzenernährung
Technische Universität München
(Chair of Plant Nutrition
Technical University of Munich)

Emil-Ramann-Strasse 2
D-85354 Freising

Tel. +49 8161 71-3578    
samuel.kn...@tum.de
www.researchgate.net/profile/Samuel_Knapp

__
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] [FORGED] Suppress horizontal mean line in beanplot()

2018-02-13 Thread Paul Murrell

Hi

Does this do the trick ... ?

library(beanplot)
beanplot(count ~ spray, data = InsectSprays)

library(gridGraphics)
grid.echo()
grid.remove("abline", grep=TRUE)

Paul

On 14/02/18 07:31, Samuel Knapp wrote:

Hi,

I would like to use the beanplot() function from the beanplot package. 
Unfortunately, I can't find out how to suppress the dashed horizontal 
line, that shows the overall mean.


In the help I've found the argument "overallline", but it only allows 
for "mean" or "median" .


I have tried overallline = F, overallline="n", and overallline="", but 
without success.


Strangely, I could also not find any suggestions on the internet.

Does anybody know how to do this?

Thanks,

Samuel

## Example code using the dataset InsectSprays from datasets package

library(beanplot)

beanplot(count ~ spray, data = InsectSprays)

# How to remove the dashed horizonal line?





--
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
p...@stat.auckland.ac.nz
http://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] plotting the regression coefficients

2018-02-13 Thread greg holly
Hi Petr;

Thanks for this. I have used  scale_colour_gradient before but could not
get what I am looking for. I will check the links you provide to get Idea.
Once again thanks for your support and help.

Rgerads,
Greg



On Tue, Feb 13, 2018 at 5:34 PM, PIKAL Petr  wrote:

> Hi
>
> scale_colour_gradient(“red”, “blue”)
>
> should do the trick.
>
> Actually I found it by Google
>
> ggplot colour
>
> http://www.cookbook-r.com/Graphs/Colors_(ggplot2)/
>
> http://www.sthda.com/english/wiki/ggplot2-colors-how-to-
> change-colors-automatically-and-manually#gradient-colors-for-scatter-plots
>
> question. So you could find it too and probably far more quickly then
> myself as I have also other duties.
>
> Cheers
>
> Petr
>
> BTW, you still post in HTML which could be sometimes problematic in this
> text only list.
>
>
>
> *From:* greg holly [mailto:mak.hho...@gmail.com]
> *Sent:* Monday, February 12, 2018 7:07 PM
> *To:* Richard M. Heiberger 
> *Cc:* PIKAL Petr ; r-help mailing list <
> r-help@r-project.org>
>
> *Subject:* Re: [R] plotting the regression coefficients
>
>
>
> Hi Petr and Richard;
>
>
>
> Thanks for your responses and supports.  I just faced a different problem.
> I have the following R codes and work well.
>
>
>
> p <- ggplot(a, aes(x=Phenotypes, y=Metabolites, size=abs(Beta),
> colour=factor(sign(Beta +
>
> theme(axis.text=element_text(size = 5))
>
> p1<-p+geom_point()
>
> p2<-p1+theme(panel.grid.major = element_blank(),
>
>   panel.grid.minor = element_blank(),
>
>   panel.border = element_blank(),
>
>   axis.ticks = element_blank())
>
>
>
> p3<-p2+theme(panel.grid.major = element_blank(), panel.grid.minor =
> element_blank(),
>
> panel.background = element_blank(), axis.line = element_line(colour =
> "black"))
>
>
>
> p4<-p3+scale_color_manual(breaks = c("-1", "0", "1"),
>
> values=c("darkblue", "green", "red"))
>
>
>
>
>
> *My question is:*
>
> What if I was to repeat the analysis and standardize the beta (z-score) so
> they are comparable across phenotypes (I have 8 phenotypes). We could then
> “bin” the betas to represent shades of red and blue.
>
>
>
> Regards,
>
>
>
> Greg
>
>
>
>
>
> On Mon, Feb 12, 2018 at 8:10 PM, Richard M. Heiberger 
> wrote:
>
> Petr, there was a thinko in your response.
>
>
> tmp <- data.frame(m=factor(letters[1:4]), n=1:4)
> tmp
> tmp$m <- factor(tmp$m, levels=c("c","b","a","d")) ## right
> tmp[order(tmp$m),]
>
> tmp <- data.frame(m=factor(letters[1:4]), n=1:4)
> levels(tmp$m) <- c("c","b","a","d") ## wrong
> tmp[order(tmp$m),]
>
> changing levels directly changes the names only, not the ordering.
> You must redefine the factor to retain the relationship of factor
> names with the numerical values.
>
> Rich
>
>
> On Mon, Feb 12, 2018 at 3:49 AM, PIKAL Petr 
> wrote:
> > Hi
> >
> > After melt you can change levels of your factor variable. Again with the
> toy example.
> >
> >> levels(temp$variable)
> > [1] "y1" "y2" "y3" "y4"
> >> levels(temp$variable) <- levels(temp$variable)[c(2,4,1,3)]
> >> levels(temp$variable)
> > [1] "y2" "y4" "y1" "y3"
> >>
> >
> > And you will get graphs with this new levels ordering.
> >
> > Cheers
> > Petr
> >
> > From: greg holly [mailto:mak.hho...@gmail.com]
> > Sent: Monday, February 12, 2018 8:52 AM
> > To: PIKAL Petr 
> > Cc: r-help mailing list 
> > Subject: Re: [R] plotting the regression coefficients
> >
> > Hi Petr;
> >
> > Thanks so much. This is great! Although last Sunday, alternatively, I
> have solved the problem using the following statement at the very end of
> the program.
> >
> >  ggsave('circle.pdf', p4, height = 70, width = 8, device=pdf, limitsize
> = F, dpi=300).
> >
> > This works very well too.
> >
> > Asa my categorical variables are in my Y axis, my R program reorders the
> names on Y-axis. However, I would like have and plot output with the names
> as they are. Is there any way to have plot without ordering the names of
> variables on Y-axis?
> >
> > Regards,
> > Greg.
> >
> > On Mon, Feb 12, 2018 at 10:12 AM, PIKAL Petr  mailto:petr.pi...@precheza.cz>> wrote:
> > Hi
> >
> > Maybe there are other ways but I would split data to several chunks e.g.
> in list and use for cycle to fill multipage pdf.
> >
> > With the toy data something like
> >
> > library(reshape2)
> > library(ggplot2)
> > temp <- melt(temp)
> > temp.s<-split(temp, cut(1:nrow(temp), 2))
> >
> > pdf("temp.pdf")
> > for (i in 1: length(temp.s)) {
> > p <- ggplot(temp.s[[i]], aes(x=par1, y=variable, size=abs(value),
> colour=factor(sign(value
> > print(p+geom_point())
> > }
> > dev.off()
> >
> > But the real code partly depends on your real data.
> >
> > Cheers
> > Petr
> >
> > From: greg holly [mailto:mak.hho...@gmail.com mak.hho...@gmail.com>]
> > Sent: Saturday, February 10, 2018 9:05 PM
> >
> > To: PIKAL Petr mailto:petr.pi...@precheza.cz>>
> > Cc: r-help mailing list  -h...@r-project.org>>
> > Subject: Re: [R] plotting the regression coefficients
> >
> > Hi Peter;
> >
> > The R code you provide

[R] Suppress horizontal mean line in beanplot()

2018-02-13 Thread Samuel Knapp

Hi,

I would like to use the beanplot() function from the beanplot package. 
Unfortunately, I can't find out how to suppress the dashed horizontal 
line, that shows the overall mean.


In the help I've found the argument "overallline", but it only allows 
for "mean" or "median" .


I have tried overallline = F, overallline="n", and overallline="", but 
without success.


Strangely, I could also not find any suggestions on the internet.

Does anybody know how to do this?

Thanks,

Samuel

## Example code using the dataset InsectSprays from datasets package

library(beanplot)

beanplot(count ~ spray, data = InsectSprays)

# How to remove the dashed horizonal line?



--
Samuel Knapp

Lehrstuhl für Pflanzenernährung
Technische Universität München
(Chair of Plant Nutrition
Technical University of Munich)

Emil-Ramann-Strasse 2
D-85354 Freising

Tel. +49 8161 71-3578   
samuel.kn...@tum.de
www.researchgate.net/profile/Samuel_Knapp

__
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] plotting the regression coefficients

2018-02-13 Thread PIKAL Petr
Hi
scale_colour_gradient(“red”, “blue”)
should do the trick.
Actually I found it by Google
ggplot colour
http://www.cookbook-r.com/Graphs/Colors_(ggplot2)/
http://www.sthda.com/english/wiki/ggplot2-colors-how-to-change-colors-automatically-and-manually#gradient-colors-for-scatter-plots
question. So you could find it too and probably far more quickly then myself as 
I have also other duties.
Cheers
Petr
BTW, you still post in HTML which could be sometimes problematic in this text 
only list.

From: greg holly [mailto:mak.hho...@gmail.com]
Sent: Monday, February 12, 2018 7:07 PM
To: Richard M. Heiberger 
Cc: PIKAL Petr ; r-help mailing list 

Subject: Re: [R] plotting the regression coefficients

Hi Petr and Richard;

Thanks for your responses and supports.  I just faced a different problem. I 
have the following R codes and work well.

p <- ggplot(a, aes(x=Phenotypes, y=Metabolites, size=abs(Beta), 
colour=factor(sign(Beta +
theme(axis.text=element_text(size = 5))
p1<-p+geom_point()
p2<-p1+theme(panel.grid.major = element_blank(),
  panel.grid.minor = element_blank(),
  panel.border = element_blank(),
  axis.ticks = element_blank())

p3<-p2+theme(panel.grid.major = element_blank(), panel.grid.minor = 
element_blank(),
panel.background = element_blank(), axis.line = element_line(colour = "black"))

p4<-p3+scale_color_manual(breaks = c("-1", "0", "1"),
values=c("darkblue", "green", "red"))


My question is:
What if I was to repeat the analysis and standardize the beta (z-score) so they 
are comparable across phenotypes (I have 8 phenotypes). We could then “bin” the 
betas to represent shades of red and blue.

Regards,

Greg


On Mon, Feb 12, 2018 at 8:10 PM, Richard M. Heiberger 
mailto:r...@temple.edu>> wrote:
Petr, there was a thinko in your response.


tmp <- data.frame(m=factor(letters[1:4]), n=1:4)
tmp
tmp$m <- factor(tmp$m, levels=c("c","b","a","d")) ## right
tmp[order(tmp$m),]

tmp <- data.frame(m=factor(letters[1:4]), n=1:4)
levels(tmp$m) <- c("c","b","a","d") ## wrong
tmp[order(tmp$m),]

changing levels directly changes the names only, not the ordering.
You must redefine the factor to retain the relationship of factor
names with the numerical values.

Rich


On Mon, Feb 12, 2018 at 3:49 AM, PIKAL Petr 
mailto:petr.pi...@precheza.cz>> wrote:
> Hi
>
> After melt you can change levels of your factor variable. Again with the toy 
> example.
>
>> levels(temp$variable)
> [1] "y1" "y2" "y3" "y4"
>> levels(temp$variable) <- levels(temp$variable)[c(2,4,1,3)]
>> levels(temp$variable)
> [1] "y2" "y4" "y1" "y3"
>>
>
> And you will get graphs with this new levels ordering.
>
> Cheers
> Petr
>
> From: greg holly [mailto:mak.hho...@gmail.com]
> Sent: Monday, February 12, 2018 8:52 AM
> To: PIKAL Petr mailto:petr.pi...@precheza.cz>>
> Cc: r-help mailing list mailto:r-help@r-project.org>>
> Subject: Re: [R] plotting the regression coefficients
>
> Hi Petr;
>
> Thanks so much. This is great! Although last Sunday, alternatively, I have 
> solved the problem using the following statement at the very end of the 
> program.
>
>  ggsave('circle.pdf', p4, height = 70, width = 8, device=pdf, limitsize = F, 
> dpi=300).
>
> This works very well too.
>
> Asa my categorical variables are in my Y axis, my R program reorders the 
> names on Y-axis. However, I would like have and plot output with the names as 
> they are. Is there any way to have plot without ordering the names of 
> variables on Y-axis?
>
> Regards,
> Greg.
>
> On Mon, Feb 12, 2018 at 10:12 AM, PIKAL Petr 
> mailto:petr.pi...@precheza.cz>>>
>  wrote:
> Hi
>
> Maybe there are other ways but I would split data to several chunks e.g. in 
> list and use for cycle to fill multipage pdf.
>
> With the toy data something like
>
> library(reshape2)
> library(ggplot2)
> temp <- melt(temp)
> temp.s<-split(temp, cut(1:nrow(temp), 2))
>
> pdf("temp.pdf")
> for (i in 1: length(temp.s)) {
> p <- ggplot(temp.s[[i]], aes(x=par1, y=variable, size=abs(value), 
> colour=factor(sign(value
> print(p+geom_point())
> }
> dev.off()
>
> But the real code partly depends on your real data.
>
> Cheers
> Petr
>
> From: greg holly 
> [mailto:mak.hho...@gmail.com>]
> Sent: Saturday, February 10, 2018 9:05 PM
>
> To: PIKAL Petr 
> mailto:petr.pi...@precheza.cz>>>
> Cc: r-help mailing list 
> mailto:r-help@r-project.org>>>
> Subject: Re: [R] plotting the regression coefficients
>
> Hi Peter;
>
> The R code you provided works very well. Once again thanks so much for this. 
> The number of variables in my data set that should appear on the y-axis is 
> 733 and they are not numerical (for example the name of one variable is 
> palmitoyl-arachidonoyl-glycer

Re: [R] plotting the regression coefficients

2018-02-13 Thread PIKAL Petr
Hi Richard

Yes you are right, I did not check my answer enough.

Cheers
Petr

> -Original Message-
> From: Richard M. Heiberger [mailto:r...@temple.edu]
> Sent: Monday, February 12, 2018 6:10 PM
> To: PIKAL Petr 
> Cc: greg holly ; r-help mailing list  project.org>
> Subject: Re: [R] plotting the regression coefficients
>
> Petr, there was a thinko in your response.
>
>
> tmp <- data.frame(m=factor(letters[1:4]), n=1:4) tmp tmp$m <- factor(tmp$m,
> levels=c("c","b","a","d")) ## right tmp[order(tmp$m),]
>
> tmp <- data.frame(m=factor(letters[1:4]), n=1:4)
> levels(tmp$m) <- c("c","b","a","d") ## wrong tmp[order(tmp$m),]
>
> changing levels directly changes the names only, not the ordering.
> You must redefine the factor to retain the relationship of factor names with 
> the
> numerical values.
>
> Rich
>
>
> On Mon, Feb 12, 2018 at 3:49 AM, PIKAL Petr  wrote:
> > Hi
> >
> > After melt you can change levels of your factor variable. Again with the toy
> example.
> >
> >> levels(temp$variable)
> > [1] "y1" "y2" "y3" "y4"
> >> levels(temp$variable) <- levels(temp$variable)[c(2,4,1,3)]
> >> levels(temp$variable)
> > [1] "y2" "y4" "y1" "y3"
> >>
> >
> > And you will get graphs with this new levels ordering.
> >
> > Cheers
> > Petr
> >
> > From: greg holly [mailto:mak.hho...@gmail.com]
> > Sent: Monday, February 12, 2018 8:52 AM
> > To: PIKAL Petr 
> > Cc: r-help mailing list 
> > Subject: Re: [R] plotting the regression coefficients
> >
> > Hi Petr;
> >
> > Thanks so much. This is great! Although last Sunday, alternatively, I have
> solved the problem using the following statement at the very end of the
> program.
> >
> >  ggsave('circle.pdf', p4, height = 70, width = 8, device=pdf, limitsize = F,
> dpi=300).
> >
> > This works very well too.
> >
> > Asa my categorical variables are in my Y axis, my R program reorders the
> names on Y-axis. However, I would like have and plot output with the names as
> they are. Is there any way to have plot without ordering the names of 
> variables
> on Y-axis?
> >
> > Regards,
> > Greg.
> >
> > On Mon, Feb 12, 2018 at 10:12 AM, PIKAL Petr
> mailto:petr.pi...@precheza.cz>> wrote:
> > Hi
> >
> > Maybe there are other ways but I would split data to several chunks e.g. in
> list and use for cycle to fill multipage pdf.
> >
> > With the toy data something like
> >
> > library(reshape2)
> > library(ggplot2)
> > temp <- melt(temp)
> > temp.s<-split(temp, cut(1:nrow(temp), 2))
> >
> > pdf("temp.pdf")
> > for (i in 1: length(temp.s)) {
> > p <- ggplot(temp.s[[i]], aes(x=par1, y=variable, size=abs(value),
> > colour=factor(sign(value
> > print(p+geom_point())
> > }
> > dev.off()
> >
> > But the real code partly depends on your real data.
> >
> > Cheers
> > Petr
> >
> > From: greg holly
> > [mailto:mak.hho...@gmail.com]
> > Sent: Saturday, February 10, 2018 9:05 PM
> >
> > To: PIKAL Petr mailto:petr.pi...@precheza.cz>>
> > Cc: r-help mailing list
> > mailto:r-help@r-project.org>>
> > Subject: Re: [R] plotting the regression coefficients
> >
> > Hi Peter;
> >
> > The R code you provided works very well. Once again thanks so much for this.
> The number of variables in my data set that should appear on the y-axis is 733
> and they are not numerical (for example the name of one variable is palmitoyl-
> arachidonoyl-glycerol (16:0/20:4) [1]*. So, the plot looks very messy in one
> page. How can I make the plot to print out on multiple pages?
> >
> > Regards,
> >
> > Greg
> >
> > On Thu, Feb 8, 2018 at 4:33 PM, greg holly
> mailto:mak.hho...@gmail.com>> wrote:
> > Hi Petr;
> >
> > Thanks so much. Exactly this is what I need. I will play to change color 
> > and so
> on but this backbound is perfect to me. I do appreciate your help and support.
> >
> > Regards,
> > Greg
> >
> > On Thu, Feb 8, 2018 at 1:29 PM, PIKAL Petr
> mailto:petr.pi...@precheza.cz>> wrote:
> > Hi
> > I copied your values to R, here it is
> >
> >> dput(temp)
> >
> > temp <- structure(list(par1 = structure(1:4, .Label = c("x1", "x2",
> > "x3", "x4"), class = "factor"), y1 = c(-0.19, 0.45, -0.09, -0.16),
> > y2 = c(0.4, -0.75, 0.14, -0.01), y3 = c(-0.06, -8.67, 1.42,
> > 2.21), y4 = c(0.13, -0.46, 0.06, 0.06)), .Names = c("par1", "y1",
> > "y2", "y3", "y4"), class = "data.frame", row.names = c(NA,
> > -4L))
> >
> > For plotting it need to be reshaped
> >
> > library(reshape2)
> > library(ggplot2)
> >
> > temp <- melt(temp)
> > p <- ggplot(temp, aes(x=par1, y=variable, size=abs(value),
> > colour=factor(sign(value
> > p+geom_point()
> >
> > Is this what you wanted?
> >
> > Cheers
> > Petr
> > And preferably do not post in HTML, the email content could be scrambled.
> >
> > From: greg holly
> > [mailto:mak.hho...@gmail.com]
> > Sent: Thursday, February 8, 2018 9:23 AM
> > To: PIKAL Petr mailto:petr.pi...@precheza.cz>>
> > Cc: r-help mailing list
> > mailto:r-help@r-project.org>>
> > Subject: Re: [R] plotting the regression coefficients
> >
> > Hi 

Re: [R] Syntax highlighting

2018-02-13 Thread Loris Bennett
Hi Sigbert,

Sigbert Klinke  writes:

> Hi,
>
> I would like know if there are any plans for some "standardized"
> syntax highlighting of R code?
>
> * Currently I'm using minted for my LaTeX slides with pygmentize and I
> do not know what scheme is used for highlighting the R code.
> * RStudio uses (as default) TextMate (Text editor for MacOS)
> highlighting for R code.
> * The R package "highr" just defines CSS classes and does not provide
> any default CSS file, but embeds andre simons Highlight 3.42 Software
>
> Of course, for my students I would like to have approximately the same
> highlighting in the slides, in RStudio and in shiny.

I'm not in a position to know whether anyone has such plans, but I
assume that trying to standardise syntax highlighting is probably a can
of worms that no-one would want to open, as it is just too subjective an
issue.  However, I seem to remember that you can use /setminted to set
the style and

  pygmentize -L styles

will give you a list of predefined styles.  Maybe one of them is suitable.

Cheers,

Loris

-- 
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin Email loris.benn...@fu-berlin.de

__
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] Syntax highlighting

2018-02-13 Thread Sigbert Klinke

Hi,

I would like know if there are any plans for some "standardized" syntax 
highlighting of R code?


* Currently I'm using minted for my LaTeX slides with pygmentize and I 
do not know what scheme is used for highlighting the R code.
* RStudio uses (as default) TextMate (Text editor for MacOS) 
highlighting for R code.
* The R package "highr" just defines CSS classes and does not provide 
any default CSS file, but embeds andre simons Highlight 3.42 Software


Of course, for my students I would like to have approximately the same 
highlighting in the slides, in RStudio and in shiny.


Best Sigbert

--
https://hu.berlin/sk
https://hu.berlin/mmstat3

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