Code works on other PCs, but not mine

I witnessed a demo, and was given the source code and data model. I watched the owner import and run the source code flawlessly. When I run the code the UI inputs and text all render perfectly, but the plot area shows an error:
Error in ||: invalid 'y' type in 'x || y'

The plot area is generated by:

  1. an RDS model
  2. a Data Frame
  3. the predict() object.

I believe the source of the error is in the predict() object.

Here is the code snippet. I think the error is generated in the 2nd to last line.

I currently have R 3.6 Win libraries installed. Any hints or suggestions? I'm thinking it's something obvious, but I'm just missing it.

  output$modelos <- renderPlot({
      rfs <- readRDS("myRdsFile.rds")
      d <- data.frame(age=input$age,

      a <-  predict(rfs, d, na.action = "na.impute")
      plot.survival.rfsrc(a, xlim = c(0,36), ylim = c(0, 1))

Can you provide a reproducible example?

I cannot provide a reproducable example. I did not create the data model it was provided to me; it is proprietary and it is over 10 MB.

I think the important thing to note here is that the code runs flawlessly on another computer, so the problem is not the syntax. It is something else.

incompatible library versions?
difference between compiling on linux vs windows?
difference between using rStudio and another IDE?

This seems a reasonable place to start, but would require some information to make any progress.
As a side note, the shiny app seems inefficiently architected, why reload an RDS whenever a button clicked? Why not load it a single time only.

So... just to confirm. An error message of: Error in ||: invalid 'y' type in 'x || y' not so painfully obvious that even a blind monkey could fix this issue? Well, at least that makes me feel better.

Just a bit of preface - I have a team of 3 people (4 including myself). Between us we have 50+ years of software experience and can adeptly program in over 20 languages. R / R-Shiny is not in anyone's wheelhouse. Our first step is to get it functional as-is, and then make it more usable later.

We do cancer research and were gifted this code from a partnering research team (medical research director who built it on his personal pc). Now that the research has been published in the journal of medicine we must publish the companion calculator for public consumption. The research director can run it just fine on his PC and has provided all of the source code for the app (I do not have the source code which created the RDS data model file - we are expected to just use it).

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.