Re: [R] extract printed value from a function

2011-02-24 Thread Martin Maechler
> "PE" == Peter Ehlers > on Thu, 24 Feb 2011 07:07:29 -0800 writes: PE> On 2011-02-24 06:32, David Winsemius wrote: >> >> On Feb 24, 2011, at 7:22 AM, Peter Ehlers wrote: >> >>> On 2011-02-24 03:26, Duarte Viana wrote: Hello all, This

Re: [R] extract printed value from a function

2011-02-24 Thread David Winsemius
On Feb 24, 2011, at 10:07 AM, Peter Ehlers wrote: On 2011-02-24 06:32, David Winsemius wrote: On Feb 24, 2011, at 7:22 AM, Peter Ehlers wrote: On 2011-02-24 03:26, Duarte Viana wrote: Hello all, This shouldn't be difficult, but I am not able to extract a printed value from a function and

Re: [R] extract printed value from a function

2011-02-24 Thread Keith Jewell
I don't think that third suggestion actually works: > x <- print( twotPermutation(c(2,3,4),c(3,6,5),plotit=F) ) [1] 0.289 NULL > x NULL twotPermutation returns the value of invisible() which is NULL: x <- print(invisible()) x This conflicts with the documented behaviour of twotPermutation which

Re: [R] extract printed value from a function

2011-02-24 Thread Peter Ehlers
On 2011-02-24 06:32, David Winsemius wrote: On Feb 24, 2011, at 7:22 AM, Peter Ehlers wrote: On 2011-02-24 03:26, Duarte Viana wrote: Hello all, This shouldn't be difficult, but I am not able to extract a printed value from a function and assign it to an object. In my case, library(DAAG)

Re: [R] extract printed value from a function

2011-02-24 Thread David Winsemius
On Feb 24, 2011, at 7:22 AM, Peter Ehlers wrote: On 2011-02-24 03:26, Duarte Viana wrote: Hello all, This shouldn't be difficult, but I am not able to extract a printed value from a function and assign it to an object. In my case, library(DAAG) twotPermutation(c(2,3,4),c(3,6,5),plotit=F)

Re: [R] extract printed value from a function

2011-02-24 Thread Peter Ehlers
On 2011-02-24 03:26, Duarte Viana wrote: Hello all, This shouldn't be difficult, but I am not able to extract a printed value from a function and assign it to an object. In my case, library(DAAG) twotPermutation(c(2,3,4),c(3,6,5),plotit=F) [1] 0.298 I would like to assign this result to an