Question: Create R code script to do the following using an ifelse() statement: Store the following vector of prices in the variable apple. : c(109,109.8,109.14,109.85,111.13,112.23) a)
Create R code script to do the following using an ifelse() statement:
Store the following vector of prices in the variable apple.
: c(109,109.8,109.14,109.85,111.13,112.23)
a) Create an ifelse() statement that tests each of the prices against the value 111.
b)If the price is less than 111, print the result "buy the apple stock".
c) Otherwise print "don't buy the apple stock".
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
