The R Project SVN R

Rev

Rev 59039 | Rev 66444 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 59039 Rev 61433
Line 47... Line 47...
47
#endif
47
#endif
48
}
48
}
49
\details{
49
\details{
50
  Unlike \code{\link{system}}, \code{command} is always quoted by
50
  Unlike \code{\link{system}}, \code{command} is always quoted by
51
  \code{\link{shQuote}}, so it must be a single command without arguments.
51
  \code{\link{shQuote}}, so it must be a single command without arguments.
52
  
52
 
53
  For details of how \code{command} is found see \code{\link{system}}.
53
  For details of how \code{command} is found see \code{\link{system}}.
54
 
54
 
55
  On Windows, \code{env} is currently only supported for commands such
55
  On Windows, \code{env} is currently only supported for commands such
56
  as \command{R} and \command{make} which accept environment variables on
56
  as \command{R} and \command{make} which accept environment variables on
57
  their command line.
57
  their command line.
58
  
58
 
59
  Some Unix commands (such as \code{ls}) change their output depending
59
  Some Unix commands (such as \code{ls}) change their output depending
60
  on whether they think it is redirected: \code{stdout = TRUE} uses a
60
  on whether they think it is redirected: \code{stdout = TRUE} uses a
61
  pipe whereas \code{stdout = "some_file_name"} uses redirection.
61
  pipe whereas \code{stdout = "some_file_name"} uses redirection.
62
 
62
 
63
  Because of the way it is implemented, on a Unix-alike \code{stderr =
63
  Because of the way it is implemented, on a Unix-alike \code{stderr =
64
    TRUE} implies \code{stdout = TRUE}: a warning is given if this is
64
    TRUE} implies \code{stdout = TRUE}: a warning is given if this is
65
  not what was specified.
65
  not what was specified.
66
}
66
}
67
%% We use popen, and that pipes stdout only
67
%% We use popen, and that pipes stdout only
68
 
68
 
69
\value{  
69
\value{
70
  If \code{stdout = TRUE} or \code{stderr = TRUE}, a character vector
70
  If \code{stdout = TRUE} or \code{stderr = TRUE}, a character vector
71
  giving the output of the command, one line per character string.
71
  giving the output of the command, one line per character string.
72
  (Output lines of more than 8095 bytes will be split.)  If the command
72
  (Output lines of more than 8095 bytes will be split.)  If the command
73
  could not be run an \R error is generated.  If \code{command} runs but
73
  could not be run an \R error is generated.  If \code{command} runs but
74
  gives a non-zero exit status this will be reported with a warning and
74
  gives a non-zero exit status this will be reported with a warning and
Line 103... Line 103...
103
}
103
}
104
 
104
 
105
\seealso{
105
\seealso{
106
  \code{\link{system}}.
106
  \code{\link{system}}.
107
#ifdef windows
107
#ifdef windows
108
  
108
 
109
  \code{\link{shell}} and \code{\link{shell.exec}}.
109
  \code{\link{shell}} and \code{\link{shell.exec}}.
110
#endif
110
#endif
111
}
111
}
112
\keyword{interface}
112
\keyword{interface}
113
\keyword{file}
113
\keyword{file}