Imagine you want to print a user-friendly message based on the value of a variable in R. How would you approach it?

  • None of the above
  • Use the cat() function with switch statements
  • Use the echo() function with for loops
  • Use the print() function with if-else statements
You can use conditional statements like if-else in combination with the print() function to display different messages based on the value of a variable. This allows you to make the output more user-friendly and informative.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *