1. सीखें
  2. /
  3. पाठ्यक्रम
  4. /
  5. Optimizing R Code with Rcpp

Connected

अभ्यास

Print to the console

You can use Rprintf() to print formatted output to the console. It is similar to the sprintf() function in R, and uses the format specifiers:

  • %d to specify an integer
  • %s to specify a string

निर्देश

100 XP

Write a function that adds two integers (x and y) and prints the following message about it:

** <x> + <y> = <x + y>