Re: [R] large number of scrollable histograms....

2019-01-23 Thread Bill Poling
Hi akshay Kulkarni, I just worked through this great tutorial the other day, 
hope this helps!

WHP

https://www.r-bloggers.com/how-to-combine-multiple-ggplot-plots-to-make-publication-ready-plots/



From: R-help  On Behalf Of Eric Berger
Sent: Tuesday, January 22, 2019 8:59 AM
To: PIKAL Petr 
Cc: R help Mailing list 
Subject: Re: [R] large number of scrollable histograms

Another alternative is to use ggplot2 to create the various plots, then put
them into
a list and use cowplot::plot_grid to plot the grid of plots with a
specified number of
rows and columns. Here's some pseudo code to give you the general idea

Step 1: generate the plots and put them into a list
for ( i in 1:(nrow*ncol) )
pL[[ i ]] <- ggplot( ... )

Step 2: display the plots in a grid
print( cowplot::plot_grid( plotlist=pL, nrow=nrow, ncol=ncol ) )

On Tue, Jan 22, 2019 at 3:49 PM PIKAL Petr <mailto:petr.pi...@precheza.cz> 
wrote:

> Hi
>
> what about to create all histograms in pdf device?
>
> see
> ?pdf
>
> Cheers
> Petr
>
>
> > -Original Message-
> > From: R-help <mailto:r-help-boun...@r-project.org> On Behalf Of akshay 
> > kulkarni
> > Sent: Tuesday, January 22, 2019 2:21 PM
> > To: R help Mailing list <mailto:r-help@r-project.org>
> > Subject: [R] large number of scrollable histograms
> >
> > dear members,
> > I am a day trader based in INDIA. I use R
> for my research.
> >
> > I have about 200 vectors whose histograms I need to inspect. I have to
> > compare them simultaneously.
> >
> > I know methods whereby you can plot multiple histograms on one screen.
> > However, you can clearly view only 4 to 5 histograms in one screen.
> >
> > Is there a way to construct a long list of all the 100 histograms that
> can be
> > scrollable (like you scroll up or down the R console) both downwards and
> > upwards? Any package to that effect?
> >
> > I would be highly grateful, also, if you can offer any suggestions or
> "out of the
> > box" ideas to simultaneously compare all the 100 histograms.
> >
> > very many thanks for your help and support..
> > yours sincerely,
> > AKSHAY M KULKARNI
> >
> > [[alternative HTML version deleted]]
> >
> > __
> > mailto: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.
> Osobní údaje: Informace o zpracování a ochraně osobních údajů obchodních
> partnerů PRECHEZA a.s. jsou zveřejněny na:
> https://www.precheza.cz/zasady-ochrany-osobnich-udaju/ | Information
> about processing and protection of business partner’s personal data are
> available on website:
> https://www.precheza.cz/en/personal-data-protection-principles/
> Důvěrnost: Tento e-mail a jakékoliv k němu připojené dokumenty jsou
> důvěrné a podléhají tomuto právně závaznému prohláąení o vyloučení
> odpovědnosti: https://www.precheza.cz/01-dovetek/ | This email and any
> documents attached to it may be confidential and are subject to the legally
> binding disclaimer: https://www.precheza.cz/en/01-disclaimer/
>
> __
> mailto: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]]

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

Confidentiality Notice This message is sent from Zelis. This transmission may 
contain information which is privileged and confidential and is intended for 
the personal and confidential use of the named recipient only. Such information 
may be protected by applicable State and Federal laws from this disclosure or 
unauthorized use. If the reader of this message is not the intended recipient, 
or the employee or agent responsible for delivering the message to the intended 
recipient, you are hereby notified that any disclosure, review, discussion, 
copying, or taking any action in reliance on the contents of this transmission 
is strictly prohibited. If you have received this transmission in error, please 
contact the sender immediately. Zelis, 2018.
__
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] large number of scrollable histograms....

2019-01-23 Thread PIKAL Petr
Hi

Yes, you should get multipage pdf, each page populated by single call to plot 
function.

However I am not sur if your proposal with function will work.

I usually do simply



pdf("sample.pdf", 7, 5)

for (i in 1:n) {

hist(L[[i]])

}

dev.off()

Cheers
Petr

From: akshay kulkarni 
Sent: Wednesday, January 23, 2019 8:01 AM
To: PIKAL Petr ; R help Mailing list 

Subject: Re: large number of scrollable histograms

dear pikal,
Thanks for the suggestion
I have checked ?pdf.  The syntax is:


> pdf("sample.pdf", 7, 5)

> hist(vector1)

> dev.off()
So, I surmise that instead of one hist function in the second line, if I 
include multiple histograms through a loop, it would write ALL histograms to 
sample.pdf (something like this):


> pdf("sample.pdf", 7, 5)

> histlist

> dev.off()

> histlist <- function(){ for( i in 1:length(L)){histlist[[i]] <- hist(L[[i]]}; 
> return(histlist)}



Am I right? Would this pdf document(sample.pdf)  be scrollable?



very many thanks for your time
yours sincerely,
AKSHAY M KULKARNI


From: PIKAL Petr mailto:petr.pi...@precheza.cz>>
Sent: Tuesday, January 22, 2019 7:19 PM
To: akshay kulkarni; R help Mailing list
Subject: RE: large number of scrollable histograms

Hi

what about to create all histograms in pdf device?

see
?pdf

Cheers
Petr


> -Original Message-
> From: R-help 
> mailto:r-help-boun...@r-project.org>> On Behalf 
> Of akshay kulkarni
> Sent: Tuesday, January 22, 2019 2:21 PM
> To: R help Mailing list mailto:r-help@r-project.org>>
> Subject: [R] large number of scrollable histograms
>
> dear members,
> I am a day trader based in INDIA. I use R for my 
> research.
>
> I have about 200 vectors whose histograms I need to inspect. I have to
> compare them simultaneously.
>
> I know methods whereby you can plot multiple histograms on one screen.
> However, you can clearly view only 4 to 5  histograms in one screen.
>
> Is there a way to construct a long list of all the 100 histograms that can be
> scrollable (like you scroll up or down the R console) both downwards and
> upwards? Any package to that effect?
>
> I would be highly grateful, also, if you can offer any suggestions or "out of 
> the
> box" ideas to simultaneously compare all the 100 histograms.
>
> very many thanks for your help and support..
> yours sincerely,
> AKSHAY M KULKARNI
>
> [[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.
Osobn� �daje: Informace o zpracov�n� a ochran� osobn�ch �daj� obchodn�ch 
partner� PRECHEZA a.s. jsou zve�ejn�ny na: 
https://www.precheza.cz/zasady-ochrany-osobnich-udaju/ | Information about 
processing and protection of business partner's personal data are available on 
website: https://www.precheza.cz/en/personal-data-protection-principles/
D�v�rnost: Tento e-mail a jak�koliv k n�mu p�ipojen� dokumenty jsou d�v�rn� a 
podl�haj� tomuto pr�vn� z�vazn�mu prohl�en� o vylou�en� odpov�dnosti: 
https://www.precheza.cz/01-dovetek/ | This email and any documents attached to 
it may be confidential and are subject to the legally binding disclaimer: 
https://www.precheza.cz/en/01-disclaimer/

[[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] large number of scrollable histograms....

2019-01-22 Thread Jeff Newmiller
You can use knitr (child documents) with rmarkdown to generate an html file 
containing many htmlwidgets. There are many htmlwidgets you can choose from, 
see [1]. You can also use htmlwidgets with shiny if you prefer, though I don't 
know if you can get the many plots simultaneously with shiny.

Some htmlwidgets even support linkage between the plots, so if you scroll or 
zoom through the x-axis on one, the others can adjust similarly.

[1] http://gallery.htmlwidgets.org

On January 22, 2019 5:20:35 AM PST, akshay kulkarni  
wrote:
>dear members,
> I am a day trader based in INDIA. I use R for my research.
>
>I have about 200 vectors whose histograms I need to inspect. I have to
>compare them simultaneously.
>
>I know methods whereby you can plot multiple histograms on one screen.
>However, you can clearly view only 4 to 5  histograms in one screen.
>
>Is there a way to construct a long list of all the 100 histograms that
>can be scrollable (like you scroll up or down the R console) both
>downwards and upwards? Any package to that effect?
>
>I would be highly grateful, also, if you can offer any suggestions or
>"out of the box" ideas to simultaneously compare all the 100
>histograms.
>
>very many thanks for your help and support..
>yours sincerely,
>AKSHAY M KULKARNI
>
>   [[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] large number of scrollable histograms....

2019-01-22 Thread Enrico Schumann
> "akshay" == akshay kulkarni  writes:

akshay> dear members,

akshay> I am a day trader based in INDIA. I use R for my research.

akshay> I have about 200 vectors whose histograms I need to
akshay> inspect. I have to compare them simultaneously.

akshay> I know methods whereby you can plot multiple histograms on
akshay> one screen. However, you can clearly view only 4 to 5
akshay> histograms in one screen.

akshay> Is there a way to construct a long list of all the 100
akshay> histograms that can be scrollable (like you scroll up or
akshay> down the R console) both downwards and upwards? Any package
akshay> to that effect?

akshay> I would be highly grateful, also, if you can offer any
akshay> suggestions or "out of the box" ideas to simultaneously
akshay> compare all the 100 histograms.

akshay> very many thanks for your help and support..
akshay> yours sincerely,
akshay> AKSHAY M KULKARNI

Just two thoughts:

1) You could plot all histograms into one pdf and
   scroll the PDF.

2) Do you need histograms? Boxplots for instance need
   less space (and if you sort the input data by
   median, say, they often help much better to see
   differences between samples); or use similar plots such
   as quartile plots
   (e.g. https://cran.r-project.org/web/packages/NMOF/vignettes/qTableEx.pdf ).

kind regards
 Enrico


-- 
Enrico Schumann
Lucerne, Switzerland
http://enricoschumann.net

__
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] large number of scrollable histograms....

2019-01-22 Thread Eric Berger
Another alternative is to use ggplot2 to create the various plots, then put
them into
a list and use cowplot::plot_grid to plot the grid of plots with a
specified number of
rows and columns. Here's some pseudo code to give you the general idea

Step 1: generate the plots and put them into a list
for ( i in 1:(nrow*ncol) )
   pL[[ i ]] <- ggplot( ... )

Step 2: display the plots in a grid
print( cowplot::plot_grid( plotlist=pL, nrow=nrow, ncol=ncol ) )

On Tue, Jan 22, 2019 at 3:49 PM PIKAL Petr  wrote:

> Hi
>
> what about to create all histograms in pdf device?
>
> see
> ?pdf
>
> Cheers
> Petr
>
>
> > -Original Message-
> > From: R-help  On Behalf Of akshay kulkarni
> > Sent: Tuesday, January 22, 2019 2:21 PM
> > To: R help Mailing list 
> > Subject: [R] large number of scrollable histograms
> >
> > dear members,
> > I am a day trader based in INDIA. I use R
> for my research.
> >
> > I have about 200 vectors whose histograms I need to inspect. I have to
> > compare them simultaneously.
> >
> > I know methods whereby you can plot multiple histograms on one screen.
> > However, you can clearly view only 4 to 5  histograms in one screen.
> >
> > Is there a way to construct a long list of all the 100 histograms that
> can be
> > scrollable (like you scroll up or down the R console) both downwards and
> > upwards? Any package to that effect?
> >
> > I would be highly grateful, also, if you can offer any suggestions or
> "out of the
> > box" ideas to simultaneously compare all the 100 histograms.
> >
> > very many thanks for your help and support..
> > yours sincerely,
> > AKSHAY M KULKARNI
> >
> > [[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.
> Osobní údaje: Informace o zpracování a ochraně osobních údajů obchodních
> partnerů PRECHEZA a.s. jsou zveřejněny na:
> https://www.precheza.cz/zasady-ochrany-osobnich-udaju/ | Information
> about processing and protection of business partner’s personal data are
> available on website:
> https://www.precheza.cz/en/personal-data-protection-principles/
> Důvěrnost: Tento e-mail a jakékoliv k němu připojené dokumenty jsou
> důvěrné a podléhají tomuto právně závaznému prohláąení o vyloučení
> odpovědnosti: https://www.precheza.cz/01-dovetek/ | This email and any
> documents attached to it may be confidential and are subject to the legally
> binding disclaimer: https://www.precheza.cz/en/01-disclaimer/
>
> __
> 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] large number of scrollable histograms....

2019-01-22 Thread PIKAL Petr
Hi

what about to create all histograms in pdf device?

see
?pdf

Cheers
Petr


> -Original Message-
> From: R-help  On Behalf Of akshay kulkarni
> Sent: Tuesday, January 22, 2019 2:21 PM
> To: R help Mailing list 
> Subject: [R] large number of scrollable histograms
>
> dear members,
> I am a day trader based in INDIA. I use R for my 
> research.
>
> I have about 200 vectors whose histograms I need to inspect. I have to
> compare them simultaneously.
>
> I know methods whereby you can plot multiple histograms on one screen.
> However, you can clearly view only 4 to 5  histograms in one screen.
>
> Is there a way to construct a long list of all the 100 histograms that can be
> scrollable (like you scroll up or down the R console) both downwards and
> upwards? Any package to that effect?
>
> I would be highly grateful, also, if you can offer any suggestions or "out of 
> the
> box" ideas to simultaneously compare all the 100 histograms.
>
> very many thanks for your help and support..
> yours sincerely,
> AKSHAY M KULKARNI
>
> [[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.
Osobní údaje: Informace o zpracování a ochraně osobních údajů obchodních 
partnerů PRECHEZA a.s. jsou zveřejněny na: 
https://www.precheza.cz/zasady-ochrany-osobnich-udaju/ | Information about 
processing and protection of business partner’s personal data are available on 
website: https://www.precheza.cz/en/personal-data-protection-principles/
Důvěrnost: Tento e-mail a jakékoliv k němu připojené dokumenty jsou důvěrné a 
podléhají tomuto právně závaznému prohláąení o vyloučení odpovědnosti: 
https://www.precheza.cz/01-dovetek/ | This email and any documents attached to 
it may be confidential and are subject to the legally binding disclaimer: 
https://www.precheza.cz/en/01-disclaimer/

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