[R] Locating an executable from R

Henrik Bengtsson hb at maths.lth.se
Tue Jun 24 13:18:56 CEST 2003


Something like

findFile <- function(pattern, path=Sys.getenv("PATH"), split=";", ...) {
  path <- unlist(strsplit(path, split=split));
  list.files(path=path, pattern=pattern, full.names=TRUE, ...);
}

findFile("^expl.*[.]exe$")
findFile("^notepad[.]exe$")

Cheers

Henrik Bengtsson
Lund University, Sweden

> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch 
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Søren Højsgaard
> Sent: den 24 juni 2003 11:49
> To: r-help at stat.math.ethz.ch
> Subject: [R] Locating an executable from R
> 
> 
> Hi !
> >From within R (on windows) I would like to locate and invoke an 
> >executable program (whose location is unknown to me).
> Can I do that?
> Thanks in advance
> Søren Højsgaard
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list 
> https://www.stat.math.ethz.ch/mailman/listinfo> /r-help
> 
> 
>




More information about the R-help mailing list