[R] if documentation

2022-12-06 Thread PIKAL Petr
Hallo all

 

Not sure if it is appropriate place but as I am not involved in r-devel list
I post here.

 

Documentation for Control (if, for, while, .) is missing "if else" command.
Although it can be find online elsewhere I believe that adding it either as
an example or as a third entry and paragraph about nested if's could be
beneficial.

 

if(cond) cons.expr  else if (cond) alt.expr else alt2.expr

 

Nested if expressions are better realized with "else if" instead of sequence
of plain "else" control statements especially when using several of them.

Best regards

Petr

__
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] netstat in R in linux...

2022-12-06 Thread akshay kulkarni
Dear Henrik,
   OK thanks a lot..

thanking you,
Yours sincerely,
AKSHAY M KULKARNI

From: Henrik Bengtsson 
Sent: Wednesday, December 7, 2022 12:44 AM
To: akshay kulkarni 
Cc: R help Mailing list 
Subject: Re: [R] netstat in R in linux...

> By the by, what advantages does port4me have as compared to netstat?

As I said in my previous email, it doesn't require external tools, so
it's more likely to work out of the box for more people. But that
wasn't the main reason for this package. For the full motivation
behind port4me, see the vignette
.

/Henrik

On Tue, Dec 6, 2022 at 11:00 AM akshay kulkarni  wrote:
>
> Dear Henrik
>   It is workingthanks a lot! I had actually 
> previously tried this:  sudo yum install netstat rather than sudo yum install 
> net-tools
>
> By the by, what advantages does port4me have as compared to netstat?
>
> THanking you,
> Yours sincerely,
> AKSHAY M KULKARNI
>
> 
> From: Henrik Bengtsson 
> Sent: Wednesday, December 7, 2022 12:19 AM
> To: akshay kulkarni 
> Cc: R help Mailing list 
> Subject: Re: [R] netstat in R in linux...
>
> Okay,
>
> that means that the Linux machine where you run this on does not have
> the 'netstat' software installed.  That is something that needs to be
> installed outside of R.  For example, if it's Ubuntu, I think 'sudo
> apt info net-tools' will do.
>
> (Disclaimer: I'm the author)
> A cross-platform alternative to netstat::free_port(), is
> port4me::port4me(), which is also available from CRAN
> (https://cran.r-project.org/package=port4me). It requires no external
> tools, but R (>= 4.0.0).
>
> /Henrik
>
> On Tue, Dec 6, 2022 at 10:41 AM akshay kulkarni  wrote:
> >
> > Dear Henrik,
> > The error is:
> >
> > > library(netstat)
> > > free_port()
> > sh: netstat: command not found
> > Error in system("netstat -n -a", intern = TRUE) :
> >   error in running command
> >
> > Thanking you,
> > Yours sincerely
> > AKSHAY M KULKARNI
> > 
> > From: Henrik Bengtsson 
> > Sent: Tuesday, December 6, 2022 11:53 PM
> > To: akshay kulkarni 
> > Cc: R help Mailing list 
> > Subject: Re: [R] netstat in R in linux...
> >
> > What's the error?!?
> >
> > /Henrik
> >
> > On Tue, Dec 6, 2022 at 10:19 AM akshay kulkarni  
> > wrote:
> > >
> > > dear members,
> > >
> > > I am using free_port() in netstat package in R. It is working in windows 
> > > but not in linux. It is throwing an error in linux. ANy help please?
> > >
> > > THanking you,
> > > 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.

[[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] netstat in R in linux...

2022-12-06 Thread Henrik Bengtsson
> By the by, what advantages does port4me have as compared to netstat?

As I said in my previous email, it doesn't require external tools, so
it's more likely to work out of the box for more people. But that
wasn't the main reason for this package. For the full motivation
behind port4me, see the vignette
.

/Henrik

On Tue, Dec 6, 2022 at 11:00 AM akshay kulkarni  wrote:
>
> Dear Henrik
>   It is workingthanks a lot! I had actually 
> previously tried this:  sudo yum install netstat rather than sudo yum install 
> net-tools
>
> By the by, what advantages does port4me have as compared to netstat?
>
> THanking you,
> Yours sincerely,
> AKSHAY M KULKARNI
>
> 
> From: Henrik Bengtsson 
> Sent: Wednesday, December 7, 2022 12:19 AM
> To: akshay kulkarni 
> Cc: R help Mailing list 
> Subject: Re: [R] netstat in R in linux...
>
> Okay,
>
> that means that the Linux machine where you run this on does not have
> the 'netstat' software installed.  That is something that needs to be
> installed outside of R.  For example, if it's Ubuntu, I think 'sudo
> apt info net-tools' will do.
>
> (Disclaimer: I'm the author)
> A cross-platform alternative to netstat::free_port(), is
> port4me::port4me(), which is also available from CRAN
> (https://cran.r-project.org/package=port4me). It requires no external
> tools, but R (>= 4.0.0).
>
> /Henrik
>
> On Tue, Dec 6, 2022 at 10:41 AM akshay kulkarni  wrote:
> >
> > Dear Henrik,
> > The error is:
> >
> > > library(netstat)
> > > free_port()
> > sh: netstat: command not found
> > Error in system("netstat -n -a", intern = TRUE) :
> >   error in running command
> >
> > Thanking you,
> > Yours sincerely
> > AKSHAY M KULKARNI
> > 
> > From: Henrik Bengtsson 
> > Sent: Tuesday, December 6, 2022 11:53 PM
> > To: akshay kulkarni 
> > Cc: R help Mailing list 
> > Subject: Re: [R] netstat in R in linux...
> >
> > What's the error?!?
> >
> > /Henrik
> >
> > On Tue, Dec 6, 2022 at 10:19 AM akshay kulkarni  
> > wrote:
> > >
> > > dear members,
> > >
> > > I am using free_port() in netstat package in R. It is working in windows 
> > > but not in linux. It is throwing an error in linux. ANy help please?
> > >
> > > THanking you,
> > > 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.

__
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] netstat in R in linux...

2022-12-06 Thread akshay kulkarni
Dear Henrik
  It is workingthanks a lot! I had actually previously 
tried this:  sudo yum install netstat rather than sudo yum install net-tools

By the by, what advantages does port4me have as compared to netstat?

THanking you,
Yours sincerely,
AKSHAY M KULKARNI


From: Henrik Bengtsson 
Sent: Wednesday, December 7, 2022 12:19 AM
To: akshay kulkarni 
Cc: R help Mailing list 
Subject: Re: [R] netstat in R in linux...

Okay,

that means that the Linux machine where you run this on does not have
the 'netstat' software installed.  That is something that needs to be
installed outside of R.  For example, if it's Ubuntu, I think 'sudo
apt info net-tools' will do.

(Disclaimer: I'm the author)
A cross-platform alternative to netstat::free_port(), is
port4me::port4me(), which is also available from CRAN
(https://cran.r-project.org/package=port4me). It requires no external
tools, but R (>= 4.0.0).

/Henrik

On Tue, Dec 6, 2022 at 10:41 AM akshay kulkarni  wrote:
>
> Dear Henrik,
> The error is:
>
> > library(netstat)
> > free_port()
> sh: netstat: command not found
> Error in system("netstat -n -a", intern = TRUE) :
>   error in running command
>
> Thanking you,
> Yours sincerely
> AKSHAY M KULKARNI
> 
> From: Henrik Bengtsson 
> Sent: Tuesday, December 6, 2022 11:53 PM
> To: akshay kulkarni 
> Cc: R help Mailing list 
> Subject: Re: [R] netstat in R in linux...
>
> What's the error?!?
>
> /Henrik
>
> On Tue, Dec 6, 2022 at 10:19 AM akshay kulkarni  wrote:
> >
> > dear members,
> >
> > I am using free_port() in netstat package in R. It is working in windows 
> > but not in linux. It is throwing an error in linux. ANy help please?
> >
> > THanking you,
> > 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.

[[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] netstat in R in linux...

2022-12-06 Thread Henrik Bengtsson
Okay,

that means that the Linux machine where you run this on does not have
the 'netstat' software installed.  That is something that needs to be
installed outside of R.  For example, if it's Ubuntu, I think 'sudo
apt info net-tools' will do.

(Disclaimer: I'm the author)
A cross-platform alternative to netstat::free_port(), is
port4me::port4me(), which is also available from CRAN
(https://cran.r-project.org/package=port4me). It requires no external
tools, but R (>= 4.0.0).

/Henrik

On Tue, Dec 6, 2022 at 10:41 AM akshay kulkarni  wrote:
>
> Dear Henrik,
> The error is:
>
> > library(netstat)
> > free_port()
> sh: netstat: command not found
> Error in system("netstat -n -a", intern = TRUE) :
>   error in running command
>
> Thanking you,
> Yours sincerely
> AKSHAY M KULKARNI
> 
> From: Henrik Bengtsson 
> Sent: Tuesday, December 6, 2022 11:53 PM
> To: akshay kulkarni 
> Cc: R help Mailing list 
> Subject: Re: [R] netstat in R in linux...
>
> What's the error?!?
>
> /Henrik
>
> On Tue, Dec 6, 2022 at 10:19 AM akshay kulkarni  wrote:
> >
> > dear members,
> >
> > I am using free_port() in netstat package in R. It is working in windows 
> > but not in linux. It is throwing an error in linux. ANy help please?
> >
> > THanking you,
> > 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.

__
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] netstat in R in linux...

2022-12-06 Thread akshay kulkarni
Dear Henrik,
The error is:

> library(netstat)
> free_port()
sh: netstat: command not found
Error in system("netstat -n -a", intern = TRUE) :
  error in running command

Thanking you,
Yours sincerely
AKSHAY M KULKARNI

From: Henrik Bengtsson 
Sent: Tuesday, December 6, 2022 11:53 PM
To: akshay kulkarni 
Cc: R help Mailing list 
Subject: Re: [R] netstat in R in linux...

What's the error?!?

/Henrik

On Tue, Dec 6, 2022 at 10:19 AM akshay kulkarni  wrote:
>
> dear members,
>
> I am using free_port() in netstat package in R. It is working in windows but 
> not in linux. It is throwing an error in linux. ANy help please?
>
> THanking you,
> 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.

[[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] confusion about dev.prev()

2022-12-06 Thread Martin Maechler
> Peter Langfelder 
> on Mon, 5 Dec 2022 21:40:13 +0800 writes:

> Ah, thanks, got it. Misread the help again...

... I think we all had ... and then known for a while  and then
forgot again ...

If you see how to improve the help page, so this happens less, ..
we'd look at it to add the improvement there.

Martin

> Peter

> On Mon, Dec 5, 2022 at 9:38 PM Ivan Krylov  wrote:
>> 
>> В Mon, 5 Dec 2022 21:28:16 +0800
>> Peter Langfelder  пишет:
>> 
>> > Open two devices, plot a plot, call dev.prev() and plot again. I
>> > would expect the second plot to appear in the first device, but that
>> > is not what happens; both plots appear in the second device.
>> 
>> Unfortunately, dev.prev() and dev.next() only return the number of the
>> respective device. You need dev.set() to actually make the change.
>> 
>> --
>> 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.

__
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] netstat in R in linux...

2022-12-06 Thread Henrik Bengtsson
What's the error?!?

/Henrik

On Tue, Dec 6, 2022 at 10:19 AM akshay kulkarni  wrote:
>
> dear members,
>
> I am using free_port() in netstat package in R. It is working in windows but 
> not in linux. It is throwing an error in linux. ANy help please?
>
> THanking you,
> 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.

__
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] netstat in R in linux...

2022-12-06 Thread akshay kulkarni
dear members,

I am using free_port() in netstat package in R. It is working in windows but 
not in linux. It is throwing an error in linux. ANy help please?

THanking you,
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.


[R] Preexisting Work on Data- and Control-Flow Analysis

2022-12-06 Thread Florian Sihler

Hello R-Help Mailinglist,

I hope I've found the correct mailing list for my question (if not, 
please point me to the correct one).
For my master's thesis I plan on creating and implementing a 
program-slicing algorithm for R-Programs using (probably only static) 
data- and control-flow analysis.
While researching the problem I was unable to find any preexisting work 
on the matter.
Does anyone here know of any preexisting work on data- and control-flow 
analysis (or even program slicing) in the context of R-Programs?
I would be really glad for any pointer in the right direction (or 
reasons for why doing that would be a stupid idea).


Regarding my background: I am a computer science student and usually 
program in C++, Java, TypeScript, and Haskell.
Although I've worked with R for roughly a year now (mostly in my spare 
time), I am still getting used to some constructs.


Thank you,
Florian

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