Hello,

could you help, please, to write a function which returns outcomes as

a list of vectors?

```
funct.x <- function(x, x1, x2) {
result = NULL
for(n in 1:x) {
result[n] = x[n]*x1+(1 -x[n])*x2
}#end for loop
return(result)
}#end of function
```

I'm trying to vectorize the function here:

```
funct.x.vectorized <- Vectorize(funct.x)
f <- funct.x.vectorized(c(0.1, 0.2, 0.3), c(1,2,3), c(4,5,6))
```

What I understand is I need to take each value from vector x and

multiply it by values from other vectors like this:

0.1

1 + 0.94

0.2

2 + 0.85

0.3

3 + 0.76And return it as a list of vectors of the outcomes. It does work if x

is a single value, but if x is a vector, everything fails.Thank you in advance.