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 <- data.frame(seq(.1, s/10, .1))
                m <- sapply(n, foo)
                rownames(m) <- 1:w
                colnames(m) <- seq(.1, s/10, .1)
                return(m)
        } 

best,

Steve
-- 
View this message in context: 
http://n4.nabble.com/Using-sapply-on-a-two-argument-function-tp1477883p1477956.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to