Problem with deploy an app containing mlxR

I tried to deploy my R shinyapps.io. Once deployed it, I encountered the error message: "An error has occurred. Check your logs or contact the app author for clarification"

This is the code I'm using which is also from Simulx website for PK-PD simulation.

library(mlxR)
library(ggplot2)


## user value inputs -----------------------------------------------------------------


fixedRow(
  column(6,
sliderInput("amt", "Dosing amount (mg):", 0, 1000, 50, step=10)), 
  column(6,
sliderInput("V", "Volume of distribution (L):", 0, 100, 10, step=1)),
  column(6,
sliderInput("Cl", "Select a Clearance rate (L/hr):", 0, 10, 1, step=1)),
  column(6,
sliderInput("tfd", "Select the time for first dose (hr):", 0, 10, 5, step=1)), 
  column(6, 
sliderInput("nd", "Number of doses:", 0, 20, 5, step=1)), 
  column(6,
sliderInput("ii", "Dosing Interval (hr):", 0, 20, 4, step=1))
)

## plot output code-------------------------------------------------------------------
renderPlot({

  myModel1 <- inlineModel("
[LONGITUDINAL]
input = {V, Cl}

PK:
depot(target=Ac)

EQUATION:
k = Cl/V
ddt_Ac = -k*Ac
Cc=Ac/V
                         ")
  
  
  
t1 <- input$tfd
t2 <- input$ii*(input$nd-1)+t1

adm <- list(time=seq(t1, t2,input$ii), amount=input$amt)

Cc  <- list(name='Cc',time=seq(from=0, to=100, by=1))
p   <- c(V=input$V, Cl=input$Cl)

res <- simulx(model=myModel1, 
              parameter=p, 
              output=Cc, 
              treatment=adm)

ggplot(data=res$Cc, aes(x=time, y=Cc)) + geom_line(size=1)

})

I'm using the library(mlxR) in my app and using simulx( ) which run perfectly locally. Is it the mlxR that is causing the problem? I also installed lixoft locally.

Thank you for your help.

Hi! Welcome!

I’m a little confused about what you’ve been trying to do. Are you trying to deploy a Shiny app or an R Markdown document (or maybe dashboard)?

The error message you report sounds like you might be deploying a Shiny app. If so, it’s probably a good idea to move this post to the #shiny category, so it will be most likely to be seen by people with the right knowledge to be helpful.

It would also be helpful to know where you are deploying — to a server you set up? To a hosted service, like shinyapps.io? (If you are in fact deploying a Shiny app to shinyapps.io, please also add the #shinyappsio tag to your post).

Have you checked the logs to see what went wrong? (Do you know where to find the logs for your deployment setup?)

The problem could be that the mlxR package is not installed on your server (in this case, whether your app runs locally doesn’t matter, because presumably you have all the packages you need installed locally).

thank you for your response. this is the logs I'm seeing after deploying the app:

Preparing to deploy document...DONE
Uploading bundle for document: 362055...DONE
Deploying bundle: 1433418 for document: 362055 ...
Waiting for task: 532133084
building: Building image: 1446851
building: Fetching packages
building: Installing packages
building: Installing files
building: Pushing image: 1446851
deploying: Starting instances
rollforward: Activating new instances
terminating: Stopping old instances
Document successfully deployed to https://pk-mathematical-simulation.shinyapps.io/drug_accumulation/
Deployment completed: https://pk-mathematical-simulation.shinyapps.io/drug_accumulation/
Warning message:
In as.POSIXlt.POSIXct(x, tz = tz) :
unknown timezone 'zone/tz/2018c.1.0/zoneinfo/America/Los_Angeles'

Please see the documentation about debugging your application, specifically the section on viewing your logs.

If you still think the issue is with a package you are using, see the section of the documentation on system packages.