Question: R language: Write the code in R Markdown and submit your R Markdown file here please 2. Let x be a vector of (3,6,12,17,19,33,24,21,10,8,5). Use
2. Let x be a vector of (3,6,12,17,19,33,24,21,10,8,5). Use a for loop and a conditional statement to do the following: If the x current element value is less than 15, then update that element with its current value-1 (e.g. if the current x value is 3, then update it with 2). If the x current element value is larger than or equal to 15, then no change will be made and keep the current value
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
