Dear all,
  I have a function f(x)  which return a list as result.

$T1
[1] 0.03376190
$T2
[1] 0.04725
$T3
[1] 0.3796071
$T4
[1] 0.3713452
$T5
[1] 0.4523651
$T6
[1] 0.4575873

  I now find the result for a vector of x values at one time. I want to
store the reuslt
for each xi value in a column of a matrix

 x <- seq(0,1, by=0.1)
result <- matrix(0, nrow=6, ncol=length(x))

for (i in 1:length(x)){result[,i] <- f(x[i])}

It is not working. Can some help me.

        [[alternative HTML version deleted]]

______________________________________________
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