Message-ID: <ils2avckilc721gggqtrgamk2a6jb7mmcb@4ax.com>
Date: 2003-04-19T16:07:16Z
From: Duncan Murdoch
Subject: system() and R 1.7
In-Reply-To: <76A000A82289D411952F001083F9DD06039ACB63@exsalem4-bu.odot.state.or.us>
On Fri, 18 Apr 2003 11:04:48 -0700, you wrote:
>I am using the system(command, input=a character vector) command on a
>Windows NT machine and I now get the following warning with R 1.7:
>
>Warning message:
>the condition has length > 1 and only the first element will be used in: if
>(input != "") {
>
This is a bug, fixed in the current patch version. To fix your own,
you could edit the file library/base/R/base, as follows:
27878c27879
< system <- function(command, intern = FALSE, wait = TRUE, input = "",
---
> system <- function(command, intern = FALSE, wait = TRUE, input = NULL,
27883c27884
< if (input!="") {
---
> if (!is.null(input)) {
The top lines are the released version, the lower lines are the patch.
Duncan Murdoch