Re: [R] histogram in GNU R....

2018-09-07 Thread Peter Langfelder
A simpler short term solution is to execute dev.off() and look for the plot
in file Rplots.pdf in the current directory. Depending on the OS of the
local computer, you should be able to point a file browser at the EC
instance and simply click the file to open in in a pdf viewer on the local
machine.

Peter

On Fri, Sep 7, 2018 at 10:31 AM William Dunlap via R-help <
r-help@r-project.org> wrote:

> You may have to install X11 stuff to your ec2 instance.  E.g., googling for
> "ec2 X11 forwarding" showed things like the following:
>
> Re: X11 forwarding to access AWS EC2 Linux instance
> Posted by: wilderfield
> 
> Posted on: Apr 5, 2018 11:31 AM
> [image: in response to: LE M.]
>  in
> response to: LE M.
> 
>   [image: Click to reply to this thread]
>  Reply
> 
> x11 
> sudo yum install xorg-x11-xauth
>
> The above is all I needed to get X11 forwarding working over ssh
>
> When ssh-ing to the instance, use the -X flag
>
>
> Bill Dunlap
> TIBCO Software
> wdunlap tibco.com
>
> On Fri, Sep 7, 2018 at 1:26 AM, akshay kulkarni 
> wrote:
>
> > dear members,
> >  I am running R on Linux AWS ec2 instance.
> > When I try to create a histogram in it, I am running into problems:
> >
> > > xht <- c(1,2,3,4,5,6,7,8,9,10)
> > >  hist(xht)
> > >
> >
> > when I type hist(xht), it goes to the next prompt. More importantly,
> there
> > is no error message. So, the most probable conclusion is that the command
> > gets executed. But there is no pop up screen with a histogram, and
> nothing
> > else...
> >
> > whats going on?
> >
> > How can I circumvent the help of histogram(which is not available in GNU
> > R)? summary(xht) would help, but not much. Any other function that can
> give
> > information, in LINUX R, that a histogram gives, in LINUX CLI?
> >
> > Very many thanks for your time and effort...
> > Yours sincerely,
> > AKSHAYM 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.
> >
>
> [[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] histogram in GNU R....

2018-09-07 Thread William Dunlap via R-help
You may have to install X11 stuff to your ec2 instance.  E.g., googling for
"ec2 X11 forwarding" showed things like the following:

Re: X11 forwarding to access AWS EC2 Linux instance
Posted by: wilderfield

Posted on: Apr 5, 2018 11:31 AM
[image: in response to: LE M.]
 in
response to: LE M.

  [image: Click to reply to this thread]
 Reply

x11 
sudo yum install xorg-x11-xauth

The above is all I needed to get X11 forwarding working over ssh

When ssh-ing to the instance, use the -X flag


Bill Dunlap
TIBCO Software
wdunlap tibco.com

On Fri, Sep 7, 2018 at 1:26 AM, akshay kulkarni 
wrote:

> dear members,
>  I am running R on Linux AWS ec2 instance.
> When I try to create a histogram in it, I am running into problems:
>
> > xht <- c(1,2,3,4,5,6,7,8,9,10)
> >  hist(xht)
> >
>
> when I type hist(xht), it goes to the next prompt. More importantly, there
> is no error message. So, the most probable conclusion is that the command
> gets executed. But there is no pop up screen with a histogram, and nothing
> else...
>
> whats going on?
>
> How can I circumvent the help of histogram(which is not available in GNU
> R)? summary(xht) would help, but not much. Any other function that can give
> information, in LINUX R, that a histogram gives, in LINUX CLI?
>
> Very many thanks for your time and effort...
> Yours sincerely,
> AKSHAYM 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.
>

[[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] histogram in GNU R....

2018-09-07 Thread MacQueen, Don via R-help
In addition to the other suggestions, try typing

  x11()

before using hist().

That *should* start a graphics window. If it does not, then type

  capabilities()

and see if "X11" is TRUE.

-Don

--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
Lab cell 925-724-7509
 
 

On 9/7/18, 1:26 AM, "R-help on behalf of akshay kulkarni" 
 wrote:

dear members,
 I am running R on Linux AWS ec2 instance.
When I try to create a histogram in it, I am running into problems:

> xht <- c(1,2,3,4,5,6,7,8,9,10)
>  hist(xht)
>

when I type hist(xht), it goes to the next prompt. More importantly, there 
is no error message. So, the most probable conclusion is that the command gets 
executed. But there is no pop up screen with a histogram, and nothing else...

whats going on?

How can I circumvent the help of histogram(which is not available in GNU 
R)? summary(xht) would help, but not much. Any other function that can give 
information, in LINUX R, that a histogram gives, in LINUX CLI?

Very many thanks for your time and effort...
Yours sincerely,
AKSHAYM 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.


__
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] histogram in GNU R....

2018-09-07 Thread peter dalgaard
You are most likely plotting to a non-screen device. Check dev.list() after the 
hist(), and then the documentation for that device. It's probably pdf, and 
after quitting R, you should find that a file Rplots.pdf has been created.

-pd

> On 7 Sep 2018, at 10:26 , akshay kulkarni  wrote:
> 
> dear members,
> I am running R on Linux AWS ec2 instance.
> When I try to create a histogram in it, I am running into problems:
> 
>> xht <- c(1,2,3,4,5,6,7,8,9,10)
>> hist(xht)
>> 
> 
> when I type hist(xht), it goes to the next prompt. More importantly, there is 
> no error message. So, the most probable conclusion is that the command gets 
> executed. But there is no pop up screen with a histogram, and nothing else...
> 
> whats going on?
> 
> How can I circumvent the help of histogram(which is not available in GNU R)? 
> summary(xht) would help, but not much. Any other function that can give 
> information, in LINUX R, that a histogram gives, in LINUX CLI?
> 
> Very many thanks for your time and effort...
> Yours sincerely,
> AKSHAYM 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.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd@cbs.dk  Priv: pda...@gmail.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] histogram in GNU R....

2018-09-07 Thread Ivan Krylov
On Fri, 7 Sep 2018 08:26:22 +
akshay kulkarni  wrote:

> when I type hist(xht), it goes to the next prompt. More importantly,
> there is no error message. So, the most probable conclusion is that
> the command gets executed

Yes, hist() returns its value invisibly (try typing "? invisible" in
the R prompt without the quotes), which means that you don't see it, but
you can assign it to a variable and then view as usual:

> xht <- c(1,2,3,4,5,6,7,8,9,10)
> hxt <- hist(xht)
> hxt

You can also use the following trick:

> (hist(xht))

to see the invisible returned value without assigning it to a temporary
variable.

> But there is no pop up screen with a histogram, and nothing else...

As to why you cannot see a plot, it depends a lot on your setup. For
example, how exactly do you connect to the R instance running at AWS?
If you use plain SSH from your own Linux machine, try `ssh -X` to allow
the remote server to connect to the X graphics system on your machine
and display windows (alas, it gets very slow). What does `dev.cur()`
show after you run `hist(xht)`? On my machine, when I start R with no
available X connection, it automatically switches to the
non-interactive `pdf` graphics device; all plots get redirected to the
`Rplots.pdf` file in the current directory. Perhaps you can download
that file from the EC2 instance and view it locally?

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