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