Package diffobj in Shiny - 2 different outputs in 2 different servers.

Hi there,

I have built an app which outputs a diffobj into a shiny app... Like this:

The diffobj can be seen down. I uploaded just an example. It works perfectly.

But I built a dockerfile out of rocker/shiny, everything works well excepting this diffobj part, this is what I try to explain, it has just the exact same code:

I've tried changing some parameters... Really this is the part of server.R that is acting:

  output$diff <- renderUI({
    if((!input$drp1 == "Select") & (!input$drp2 == "Select")){
      HTML(
        as.character(
          diffCsv(paste0(getwd(),"/Samples/",input$drp1),
                  paste0(getwd(),"/Samples/",input$drp2), mode="sidebyside", format="html")
        )
      )
    }
  })

Do you know what could be happening?

I've just modified it to:

 HTML(
   as.character(
     diffObj(c("1","2","3"),c("1","2","4"))
   )
 )

And this can be seen:

It is very frustrating to see that even simple things can be properly seen, when in my own environment works seamlessly! This is the output of command version in both environments (actually just the same!):

> version
               _                           
platform       x86_64-pc-linux-gnu         
arch           x86_64                      
os             linux-gnu                   
system         x86_64, linux-gnu           
status                                     
major          3                           
minor          5.2                         
year           2018                        
month          12                          
day            20                          
svn rev        75870                       
language       R                           
version.string R version 3.5.2 (2018-12-20)
nickname       Eggshell Igloo  

I am starting to think that this has something to do with the dependencies of the diffobj package... What do you think?

Or do you think that this has something to do with some special linux thing? But it really is the same OS: Debian stretch. I have Debian Stretch on the VM I use to develop, and the Dockerfile of rocker/shiny depends on the docker image of debian:stretch so it must be almost the same.

Don't know still why it worked in my computer but not but I found the solution inside the issue tracker of the diffObj repo at GitHub.

It was just a tiny detail, I had to add style=list(html.output='diff.w.style') inside the diffCsv() function.

Thank you

This topic was automatically closed 7 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.