Data importing using import(here()) not working with dashboard with runtime: shiny

Hello R nerds,
I have been trying to create flexdashbord using the runtime: shiny. It has failed to import data set using the

import(here()) 

functions. It rather worked using the absolute file path,

import("C:Users/....")

Any idea why this happen? or is there any other additions to the {rio} and {here} to work in shiny?

1 Like

Hi,

It sounds like there is an issue with the absolute file path that the here function is creating when you render the dashboard. Can you experiment by having the path it generates printed out upon rendering to see if it matches what you expect?

All the best,

Tim

Hey Berhe - shiny and here don’t play well together for some reason…
We’ve had to use system.file() for the appliedepi tutorial stuff - but those have all been in self-contained packages.
Thoughts @neale @henryls?

1 Like

I suggest to just use the hard-coded file path. Henry will know more details.

1 Like

so this is a useful discussion - there must be a workaround that wouldnt require you to hardcode…

2 Likes

Thanks everyone. Helpful to know this is global issue, I feel sad for my first few hours wasted searching this :relieved:. I will consider the use of git and unesting.

2 Likes