| 1 |
\name{u.sys} |
| 2 |
\title{'Portable' System function (R / S-plus)} |
| 3 |
\alias{u.sys} |
| 4 |
\alias{Sys.ps.cmd}% was in unix/Sys.ps.Rd |
| 5 |
\description{ |
| 6 |
\code{u.sys()} is a convenient wrapper (of \code{system()}) to call to |
| 7 |
the underlying operating system. The main purpose has been to provide |
| 8 |
a function with identical UI both in S-PLUS and \R. |
| 9 |
MM thinks you shouldn't use this anymore, usually. |
| 10 |
|
| 11 |
\code{Sys.ps.cmd()} returns the \samp{ps} (\sQuote{\bold{p}rocess \bold{s}tatus}) |
| 12 |
OS command name (as \code{\link{character}} string), and is typically |
| 13 |
usable on unix alikes only.% Windows with 'Rtools' installed ?? |
| 14 |
} |
| 15 |
\usage{ |
| 16 |
u.sys(\dots, intern = TRUE) |
| 17 |
|
| 18 |
Sys.ps.cmd() |
| 19 |
} |
| 20 |
\arguments{ |
| 21 |
\item{\dots}{any number of strings -- which will be |
| 22 |
\code{\link{paste}()}d together and passed to \code{system}.} |
| 23 |
\item{intern}{logical -- note that the default is \emph{reversed} from |
| 24 |
the one in \code{\link{system}()}.} |
| 25 |
} |
| 26 |
\author{Martin Maechler} |
| 27 |
\seealso{\code{\link{system}}, really!; |
| 28 |
on non-Windows, \code{Sys.ps()} which makes use of \code{Sys.ps.cmd()}. |
| 29 |
} |
| 30 |
\examples{ |
| 31 |
u.sys # shows how simply the function is defined : |
| 32 |
\dontrun{ |
| 33 |
function (..., intern = TRUE) |
| 34 |
system(paste(..., sep = ""), intern = intern) |
| 35 |
} |
| 36 |
|
| 37 |
# All *running* processes of user [sometimes only R]: |
| 38 |
try ( u.sys(Sys.ps.cmd(), "ur") ) |
| 39 |
} |
| 40 |
\keyword{utilities} |
| 41 |
\keyword{environment}% System, not R |