Use foreach and %:% similar to python list comprehension
x <- foreach(a=irnorm(1, count=10), .combine='c') %:% when(a >= 0) %do% sqrt(a)
Use foreach and %:% similar to python list comprehension
x <- foreach(a=irnorm(1, count=10), .combine='c') %:% when(a >= 0) %do% sqrt(a)
R
function
parallelization
loop
]