Question: comment on the code #create a list . . . N < - 1 0 0 X < - vector ( list ,
comment on the code #create a list
N
X vectorlist N
for i in :N
name pasten i
vect rnorm mean sd
Xi listname name, vect vect
#show the structure of X
strX
# Compute the sum of the values of vect in each slot
sumsvect sapplyX functionx sumx$vect
printsumsvect
# Create a matrix M of size x
M docallrbind lapplyX functionx x$vect
printM
# Compute the sums by columns of M
columnsums numericncolM
for j in :ncolM
columnsumsj sumM j
printcolumnsums
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
