Question: R programming, please help with both questions #### Question 6 (421/521) Create three vectors of length 100 named 'weight' (mean=81, sd=0.26; units=kg), height (mean='1.76`, sd=0.22;
R programming, please help with both questions
#### Question 6 (421/521) Create three vectors of length 100 named 'weight' (mean="81", sd=0.26; units=kg), height (mean='1.76`, sd=0.22; units=m), and "age' (mean="25 sd = 5; units=years) by randomly sampling three normal distributions using the stats:: rnorm' function. Generate a fourth vector gender with the same length as 'height' but by randomly sampling (with replacement) from the following vector '["A", "B", "C"]". {r Your answer to Q6} # BEGIN SOLUTION # END SOLUTION #### Question 7 (421/521) Create a `data.frameby combining the four vectors created above in **Question 6** as columns. Add a new column (BMI) with only NAS." Save your results in a new object named "Q7. {r Your answer to Q7} # BEGIN SOLUTION # END SOLUTION
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
