Page 1 of 1

Q2 1. Modify the "sim.2()" function used in "Parallelization" mclapply() lecture. Save the modified function as "my.sim.

Posted: Sun Jul 03, 2022 12:01 pm
by answerhappygod
Q2 1 Modify The Sim 2 Function Used In Parallelization Mclapply Lecture Save The Modified Function As My Sim 1
Q2 1 Modify The Sim 2 Function Used In Parallelization Mclapply Lecture Save The Modified Function As My Sim 1 (25.65 KiB) Viewed 34 times
Using R programming and R studio
Q2 1. Modify the "sim.2()" function used in "Parallelization" mclapply() lecture. Save the modified function as "my.sim.2()". Your "my.sim.2()" function has: o the mean value in the "rnorm()" function fixed at 20; o the first line in "my.sim.2()" function body set a seed number; o my.sim.2() function takes only one numeric value "my.seed" as input and will pass this value as input when you set seed. 2. Use multiple CPU cores to speed up the function "lapply(101:200, my.sim.2)" Report time consumption before VS after multiple core speed up.