code: def check_with_r(self):
      if not _host_os_eq(self.target_os):
          raise ValueError(
              "Cannot run R: host {}, target_os {}".format(
                  os.uname()[0], self.target_os
              )
          )
      seen_errors = False
      cmd = [
          "R",
          "CMD",
          "check",
          self.r_dir,
          "--no-manual",
          "--no-examples",
          "--no-multiarch",
      ]
      print("EXECUTING {}".format(" ".join(cmd)))
      r = sp.Popen(cmd, stderr=sp.PIPE, universal_newlines=True)
      for line in r.stderr.readlines():
          sys.stdout.write(line)
          m = re.match(r".*ERROR.*", line)
          if m:
              seen_errors = True
      status = r.wait()
      assert status == 0, "Command failed with exit status " + str(
          status
      )
      assert not seen_errors, "Command completed with errors"
  
imports: from __future__ import print_function
  import argparse
  import os
  import re
  import shutil
  import subprocess
  import sys
  import tempfile
label_desc: Use image node_id 5 for calling the RPackager obj's underlying member method code with example usage: obj.check_with_r() without return types