# R Problems on macOS (high sierra) since R version 3.5

**URL:** <https://forum.knime.com/t/r-problems-on-macos-high-sierra-since-r-version-3-5/10935>\
**Category:** KNIME Analytics Platform\
**Created:** [May 6, 2018, 2:21pm UTC](https://forum.knime.com/t/r-problems-on-macos-high-sierra-since-r-version-3-5/10935 "2018-05-06T14:21:59Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [May 6, 2018, 2:21pm UTC](https://forum.knime.com/t/r-problems-on-macos-high-sierra-since-r-version-3-5/10935/1 "2018-05-06T14:21:59Z")

</div>

I am experiencing a strange problem with R Snippets in KNIME 3.5.3 on a macOS (high sierra 10.13.4 (17E202)) system since switching to the newest R version 3.5. It seems to be there with every R Snippet I use that generates an output table, the system is not able to get back knime.out parameters and throws strange error messages. The first part using R does work so there does not seem to be a general R problem.

Well yes I tried to reinstall R, I made sure I have RServe and Cairo up and running and I also tried starting RServe separately and I tried to use every variant of R Scripting there is. And yes I also installed XQuartz …

It looks as if the KNIME R Snippets are expecting some meta variables or something that might not be there anymore with R 3.5.

I am wondering if other macOS users also have this problem or if I have to look further into my configuration.

[m\_008\_problems\_r350.knwf](https://forum-cdn.knime.com/uploads/default/original/2X/1/1461634079ce9a0c804ef383451c62ed06ecde43.knwf) (35.8 KB)

---

<div class="post-metadata">

**Author:** ![jonasfoe](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/j/a88e4f/32.png) [@jonasfoe](https://forum.knime.com/u/jonasfoe)\
**Post date:** [May 7, 2018, 11:28am UTC](https://forum.knime.com/t/r-problems-on-macos-high-sierra-since-r-version-3-5/10935/2 "2018-05-07T11:28:31Z")

</div>

I have similar issues but I just started using KNIME and was trying some tutorials.  
I use macOS and installed both R and KNIME via homebrew.  
I have both RServe and Cairo available.

Errors look like this:  
`ERROR: Could not execute internal command.ERROR: R evaluation failed.: "sapply(ls(),function(a)class(get(a,envir=globalenv()))[1])"ERROR: R evaluation failed.: "sapply(ls(),function(a)class(get(a,envir=globalenv()))[1])"ERROR: eval failed`

---

<div class="post-metadata">

**Author:** ![jonathan.hale](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/j/eb9ed0/32.png) [@jonathan.hale](https://forum.knime.com/u/jonathan.hale)\
**Post date:** [May 7, 2018, 3:50pm UTC](https://forum.knime.com/t/r-problems-on-macos-high-sierra-since-r-version-3-5/10935/3 "2018-05-07T15:50:20Z")

</div>

Could you try loading all the libraries/packages you are using in those R scripts with Standalone R (not from KNIME)? Does that work or does that produce an error of some sort?

---

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [May 7, 2018, 6:43pm UTC](https://forum.knime.com/t/r-problems-on-macos-high-sierra-since-r-version-3-5/10935/4 "2018-05-07T18:43:36Z")

</div>

All codes are working fine with just ‘pure’ R. Also the left Node with the Replacement of NAs works fine. The moment I try to get to the result it does not work. I tried to call the library Cairo but there is no specific function in the right node, it just tries to retrieve the result (which is already there).

knime.out \<- as.data.frame(rframe)  
knime.out \<- rframe

This does not work regardless which kind of R Snippet I use. For me it looks like something changed in R 3.5 which KNIME is relying on. It could be that it tries always to put some example PNG files in a folder and maybe R does not do that anymore.

The fact that jonasfoe has the exact same result on his macOS system leads me to the assumption that there is a more general problem.

I also attached a part of the knime.log when the right node fails. If you could have another look or maybe try to do this on a recent macOS system it would be highly appreciated.

[knime\_log2.docx](https://forum-cdn.knime.com/uploads/default/original/2X/8/88fa8dc5e9c1482051291a4b9918a432e4a6746f.docx) (13.5 KB)

 ![32](https://forum-cdn.knime.com/uploads/default/original/2X/1/1ca6b44b0c10297a6b7c173c984919107f194300.png)

---

<div class="post-metadata">

**Author:** ![jonasfoe](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/j/a88e4f/32.png) [@jonasfoe](https://forum.knime.com/u/jonasfoe)\
**Post date:** [May 8, 2018, 11:04am UTC](https://forum.knime.com/t/r-problems-on-macos-high-sierra-since-r-version-3-5/10935/5 "2018-05-08T11:04:50Z")

</div>

OK i switched from homebrew R to the package provided by CRAN and I also installed XQuartz.  
Now I’m good but I cannot attest to the original problem in this thread. I think mine might have been different.

---

<div class="post-metadata">

**Author:** ![jonasfoe](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/j/a88e4f/32.png) [@jonasfoe](https://forum.knime.com/u/jonasfoe)\
**Post date:** [May 8, 2018, 11:07am UTC](https://forum.knime.com/t/r-problems-on-macos-high-sierra-since-r-version-3-5/10935/6 "2018-05-08T11:07:16Z")

</div>

Actually, I still get the weird error messages.  
It’s just that some processing seems to work in spite of it.  
Sorry for the confusion.

---

<div class="post-metadata">

**Author:** ![jonathan.hale](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/j/eb9ed0/32.png) [@jonathan.hale](https://forum.knime.com/u/jonathan.hale)\
**Post date:** [May 8, 2018, 1:17pm UTC](https://forum.knime.com/t/r-problems-on-macos-high-sierra-since-r-version-3-5/10935/7 "2018-05-08T13:17:27Z")

</div>

From the changelog of R 3.5 I read

> Support for a system Java on macOS has been removed — install a fairly recent  
> Oracle Java (see ‘R Installation and Administration’ §C.3.2).

Which is the only part which could be remotely related to this. Could you try that?

Cheers, Jonathan.

---

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [May 10, 2018, 10:26am UTC](https://forum.knime.com/t/r-problems-on-macos-high-sierra-since-r-version-3-5/10935/8 "2018-05-10T10:26:49Z")

</div>

I have installed the latest version of Java for macOSX (Version 8 Update 171 (Build 1.8.0\_171-b11)) but the problem is still there and I would be surprised if this is the reason because the first part of the workflow just works fine, only the part where the output should be retrieved is not working.

If just evaluating the R nodes that actually work they still produce an error message

_ERROR: Could not execute internal command.ERROR: R evaluation failed.: "sapply(ls(),function(a)class(get(a,envir=globalenv()))[1])"ERROR: R evaluation failed.: "sapply(ls(),function(a)class(get(a,envir=globalenv()))[1])"ERROR: eval failed_

For me this looks like something in R 3.5 changed that the R nodes of KNIME just assume would be there (some global setting, some PNG examples to be put somewhere). Some way the knime.out location gets transmitted.

Again it would be good if someone could try to reproduce the phenomenon on a macOSX machine.

And yes I know it is more likely that a stupid user does not know how to properly set up R in KNIME (and then on a Mac, oh boy …) than that there is a freak combination of changes in settings and so on. But unfortunately over the years I have encountered more and more of this occasions where I as a quite seasoned user stumbled across such freak combinations that cannot be dealt with by ‘try reboot’ 😉

---

<div class="post-metadata">

**Author:** ![saviola](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/4bbf92/32.png) [@saviola](https://forum.knime.com/u/saviola)\
**Post date:** [June 7, 2018, 7:59am UTC](https://forum.knime.com/t/r-problems-on-macos-high-sierra-since-r-version-3-5/10935/9 "2018-06-07T07:59:46Z")

</div>

I ran into the same problem on Linux (Arch) with KNIME 3.5.3 (KNIME Interactive R Statistics Integration 3.5.1.v201712211140) and R 3.5. I manually compiled R 3.4.4 (making sure to pass --enable-R-shlib to ./configure) and changed the R home configuration in KNIME, and it worked again.

So, as suggested, this is most likely something that has changed in R 3.5 (and is not specific to macOS).

---

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [July 5, 2018, 2:43pm UTC](https://forum.knime.com/t/r-problems-on-macos-high-sierra-since-r-version-3-5/10935/10 "2018-07-05T14:43:12Z")

</div>

@thor mentioned something about this problem here:

> [@Python node failing - No serializer extension having the id or processing python type "int"](https://forum.knime.com/t/python-node-failing-no-serializer-extension-having-the-id-or-processing-python-type-int/11203/14):
>
> R 3.5 has a bug in Rserve that lets our integration fail. We don’t have a solution for this yet.

–  
Edit: [KNIME and R — installation across operating systems — some remarks | by Markus Lauber | Low Code for Data Science | Medium](https://medium.com/low-code-for-advanced-data-science/knime-and-r-installation-across-operating-systems-some-remarks-6494a2a498cc)

---

<div class="post-metadata">

**Author:** ![jonathan.hale](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/j/eb9ed0/32.png) [@jonathan.hale](https://forum.knime.com/u/jonathan.hale)\
**Post date:** [August 17, 2018, 9:44am UTC](https://forum.knime.com/t/r-problems-on-macos-high-sierra-since-r-version-3-5/10935/11 "2018-08-17T09:44:57Z")

</div>

This issue was fixed in R 3.5.1 and Rserve 1.8-6.

To get that version of Rserve, you will need to install it via:  
`install.packages('Rserve',,"http://rforge.net/",type="source")`

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [August 24, 2018, 10:06am UTC](https://forum.knime.com/t/r-problems-on-macos-high-sierra-since-r-version-3-5/10935/12 "2018-08-24T10:06:51Z")

</div>

Closed on August 24, 2018, 10:06am UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
