Question: How to do the following or type it in R studio. Thanks in advance! 1 ) Write an R script to practice the if -
How to do the following or type it in R studio. Thanks in advance!
Write an R script to practice the ifelse command, for two
alternatives. For alternative compute the sum of and For
alternative compute the product of and Define the alternative
by choosing the value of variable X at the beginning of the code,
and check X by using if to decide which alternative to compute.
Write an R script to practice the while command. Use a while
loop, which prints the elements of the sequence Use
the start value and increment the index by in the loop.
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
