How to access all R objects present in global environment of R into shiny app

#1

...How to access all R objects present in global environment of R into shiny app, because I need to use that data frames generated in global environment into the shiny app.
Thanks in advance,
Manohar

0 Likes

#2

I think you're looking for objects or ls

https://stat.ethz.ch/R-manual/R-devel/RHOME/library/base/html/ls.html


Note also RStudio's environment pane >> Global Environment.

0 Likes

#3

I want to use some dataframes in shiny app that were created in global environment , so I need access for shiny app to access all dataframes present in global environment of R so that it uses the required dataframes present in global environment of R

0 Likes

#4

Shiny Apps run on a different R session than RStudio or R, you have to load those dataframes explicitly on that session, you could do this adding the appropriate code for loading the data frames at the beginning of your app.R (or server.R) file.

0 Likes

#5

I would dynamically genarate a dataframe and store it in global environment ,now I can access that dataframe into shiny app but I want to split that into multiple dataf rames and assigning names to each of them.After that i want access each of that dataframe in the shiny app .how to do it

0 Likes

#6

If you do this inside your app.R file then your dataframes would be immediately available for your app.

0 Likes

#7

Campaigns_Split=split(Smart_Datum,f=Smart_Datum$Campaign)
Names=names(Campaigns_Split)
lapply(seq_along(Campaigns_Split),
function(x) {
assign( Names, Campaigns_Split[], ,envir =..Global.env)
}
)
I am getting these dataframes genarated in global environment

0 Likes

#8

how to genarate these dataframes in to shiny app unlike global environment of R

0 Likes