Message-ID: <47CDDCF8.6010901@stats.uwo.ca>
Date: 2008-03-04T23:36:24Z
From: Duncan Murdoch
Subject: vector manipulations
In-Reply-To: <B998A44C8986644EA8029CFE6396A9240100C9D5@exqld2-bne.nexus.csiro.au>
On 3/4/2008 5:41 PM, Bill.Venables at csiro.au wrote:
> Your problem is that your function log1( , ) is not vectorized with
> respect to its arguments. For a function to work in outer(...) it must
> accept vectors for its first two arguments and it must produce a
> parallel vector of responses.
>
> To quote the help information for outer:
>
> "FUN is called with these two extended vectors as arguments. Therefore,
> it must be a vectorized function (or the name of one), expecting at
> least two arguments."
>
> Sometimes Vectorize can be used to make a non-vectorized function into a
> vectorized one, but the results are not always entirely satisfactory in
> my experience.
What problems have you seen?
Duncan Murdoch