Thanks Peter,
your solution worked perfectly. It also helped me realize the mistake I made
in my own script - the 'k' function was returning values for 'y' between
1:10 rather than .1:1 - it should have looked like this:
k <- function(s) {
n <- seq(.1, s/10, .1)
m
How about
t(outer(seq(.1,1,.1), 1:12, foo))
Convert to dataframe, etc.
-Peter Ehlers
Steven Worthington wrote:
Dear R users,
I have a function (simplified here) that accepts two arguments and performs
various calculations:
foo <- function(y, x) {
a <- y*sqrt(x)
Dear R users,
I have a function (simplified here) that accepts two arguments and performs
various calculations:
foo <- function(y, x) {
a <- y*sqrt(x)
b <- a+2
c <- a*b
return(c)
}
If I call the function as follows I get th
3 matches
Mail list logo