using baseballr in Knime

Phew. That’s a weird one. It seems to be the same issue as here: Table to R not able to load library. Our R Snippet node apparently cannot connect to the internet to download data.

If I run the script from the node in a standalone R it works without problems, and also in the community (MPI) R snippet node.

If I run the command player_stats <- playerid_lookup("Trout", "Mike") in a standalone R session, save the result to a table, and replace the line in the R Snippet node by player_stats <- read.table(...) then everything works as expected.

I assume the reason is that we’re running the R code from KNIME via RServe and communicate via sockets. Maybe, for some reason, this is configured in a way that it cannot talk to the “outside world”. I had a glance at the code but did not find a place where this might be configured that way…

Does this help a bit?

2 Likes