title: R error: C stack usage too close to limit on small dataset
body: <p>I have just done a clean install of R on Ubuntu 18.04, and it does not really work.</p>
  
  <p>I can do stuff like make vectors and dataframes, and get summaries. I can also make a histogram with the hist command just fine. However, the plot command does not work.</p>
  
  <p>The following code, which is very basic and should work just fine:</p>
  
  <pre><code>data(faithful)
  plot(faithful$eruptions)
  </code></pre>
  
  <p>runs for about 30 seconds, before giving the following error:</p>
  
  <pre><code>Error: C stack usage  7970244 is too close to the limit
  </code></pre>
  
  <p>I have seen lots of posts of other people having the same error, but it seems to be because they are dealing with large datasets/lots of recursion or something like that, but I have this problem even with a dataset of just 3 values. R should definitely be able to handle this without me increasing the limit, and it should not take 30 seconds to run.</p>
  
  <p>Does anybody know what the problem could be?</p>
  
  <p>Edit:
  Output of <code>ulimit -a</code>:</p>
  
  <pre><code>core file size          (blocks, -c) 0
  data seg size           (kbytes, -d) unlimited
  scheduling priority             (-e) 0
  file size               (blocks, -f) unlimited
  pending signals                 (-i) 28697
  max locked memory       (kbytes, -l) 16384
  max memory size         (kbytes, -m) unlimited
  open files                      (-n) 1024
  pipe size            (512 bytes, -p) 8
  POSIX message queues     (bytes, -q) 819200
  real-time priority              (-r) 0
  stack size              (kbytes, -s) 8192
  cpu time               (seconds, -t) unlimited
  max user processes              (-u) 28697
  virtual memory          (kbytes, -v) unlimited
  file locks                      (-x) unlimited
  </code></pre>
  
  <p>Version info:</p>
  
  <pre><code>R version 3.4.4 (2018-03-15) -- "Someone to Lean On"
  Copyright (C) 2018 The R Foundation for Statistical Computing
  Platform: x86_64-pc-linux-gnu (64-bit)
  </code></pre>
  
  <p>This is plain R in the terminal, not through any IDE.</p>
  
  <p>Edit 2:</p>
  
  <p>I have discovered that it works just fine on other user accounts on the computer. I've also started getting other weird issues (after a reboot I have to login to a Gnome session, then log out before I can log into plasma, but other users don't have that problem, sometimes the terminal can't launch, lots of things are crashing, etc) so I think this has nothing to do with R and is much bigger. Unfortunately, it might be a hardware issue (this computer has had wacky issues before on other operating systems).</p>