Question: The following correspond to the programming language R. Please write out what the code would be for each category. 1) Use the : or `c()`
The following correspond to the programming language R. Please write out what the code would be for each category.
1) Use the : or `c()` or `seq()` function to create a vector of numbers that ranges from 1 to 10. 2) Name the vector "vector.1" using variable assignment. 3) Print the vector.
---
4) Use the `rep()` function to create a holding vector for a `for()` loop populated with NaN. Make this vector the same length as vector.1 from #1 (a length of 10). 5) Name the vector "vector.2" using variable assignment. 6) Print the vector.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
