Marc Schwartz-3 wrote
>
> See ?as.formula and ?paste
>
> Something along the lines of the following should work:
>
> Args <- c("one", "two", "three")
>
>> Args
> [1] "one" "two" "three"
>
>> paste(Args[1], "~", Args[2])
> [1] "one ~ two"
>
>> as.formula(paste(Args[1], "~", Args[2]))
> o
On Jan 4, 2012, at 4:08 PM, dood wrote:
Dear R users,
This probably a really noob question, but I'm stuck. I'd like to
pass some
variables from bash to R as strings. I can successfully pass
variables using
commandArgs(), the problem is that I end up with an array.
Huh? You should be get
On Jan 4, 2012, at 3:08 PM, dood wrote:
> Dear R users,
>
> This probably a really noob question, but I'm stuck. I'd like to pass some
> variables from bash to R as strings. I can successfully pass variables using
> commandArgs(), the problem is that I end up with an array. So, for example:
>
>
Dear R users,
This probably a really noob question, but I'm stuck. I'd like to pass some
variables from bash to R as strings. I can successfully pass variables using
commandArgs(), the problem is that I end up with an array. So, for example:
> Args <- commandArgs(TRUE)
> Args
[1] "one" "two"
4 matches
Mail list logo