Help Needed - Shiny app.R calling an Rmd file for html report

My shiny app.R calls an Rmd file, passes data and generates an html report.
I can run SUCCESSFULLY locally on my Windows 64 bit desktop as
(1) an app.R and
(2) knit - Rmd file.

The install on shinyApps.io goes smoothly. I can run the app but it fails.

Here is the short summary from rsconnect::showLogs:

2020-02-11T01:36:53.621107+00:00 shinyapps[1791014]:

label: getglance2 (with options)

Quitting from lines 890-900 (FastRnD_beta_v_0.Rmd)
Warning: Error in : Can't subset columns that don't exist.
✖ The column adjRsq doesn't exist.

Here is the offending code:


# show_glance = dplyr::select(glance_all_models, responses, r.squared, adj.r.squared, std_dev, F_stat, p.value , df , df.residual ) ## ERROR HERE 2.9.2020 already unnested. line below is corrected line

show_glance = dplyr::select( result_summary_gl_td_aug , responses , rsq , adjRsq , std_dev , F_stat , p_value )

#"R_sq" = r.squared , "adj_R_sq" = adj.r.squared , "std_dev" = sigma , "F_value" = statistic , p.value )


I am running R version 3.6.2 (2019-12-12) using R Studio Version 1.2.5033
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

its curious that its not complaing about responses, rsq .. they appear to be available.
Perhaps you can investigate if there is any reason that adjRsq wouldnt be in result_summary_gl_td_aug

I'm now wondering whether it even is the dplyr::select() that is the problem. If I challenge it to select columns that aren't missing I get a different error than you show:

library(tidyverse)
testtrib <- tribble ( ~a, ~b ,
                      1,2
)
testtrib %>% dplyr::select(a,b,d)

Error in .f(.x[[i]], ...) : object 'd' not found

Thanks!
While I have been learning on my own R, Rmd, for nearly three years and Shiny for perhaps a year or so, I feel I am still a neophyte.
Since in my Rstudio, knittr finds AdjRsquare and shiny app.R finds AdjRsquare and they generate expected html report, and I am a neophyte, I am at a total loss on what shinyApps.io is doing.

P. S. if I run knittr Rmd in interactive mode, I can see the AdjRsquare!

You could add some old fashioned print() commands at the parts of your code which relate to the pipeline of getting and changing adjrsquare.
You could then look into the logs on shinyapps.io
You could probably make a renderprint object for displaying messages you send yourself about the the status of adjrsquare. You could use a reactiveval that you append messages to, to show a visual in app log without accessing the shinyapps.io dashboard.

Thanks!

Again I am a bit confused. Did you mean to include 'd' in your dplyr::select statement?

I put the non existent d in there only to demonstrate to you the text of the corresponding error message.

I.e.

Is not the same as object not found

Ah, I get it. Thanks for a lightening fast response.

Like you I am wondering, if there is a bug in new dplyr released around November.
Nest/unnest functions have changed, the recommended nest_legacy and unnest_legacy did not work for me, so I had to make a few changes to get my app to work again in Knit Rmd mode and shiny app.R mode. I got it to work. Now I am struggling with some compatibility issue on shinyApps.io platform.

How can I find out what packages are being installed on shinyApps.io platform when my app is compiled by rsconnect and pushed into the cloud?

Thanks for clarifying. I just proved my neophyte status :wink:

Shinyapps.io looks at your code to upload for explicit library () calls and will install as needed.
You can run a function to see what it thinks are your dependencies.

dependencies for the app in the current working
Directory [37(https://github.com/rstudio/rsconnect/blob/90bf6cde2bf6f12484fd89d866363d4b78cc483d/R/dependencies.R
appDependencies()

Thanks! I will check it out.

I made some progress using your suggestion " use print statements" At one line of code, I have a tibble of nested ouputs that has 22 columns, for some reason shiny could detect only 9. so removed the unnecessary ones using dplyr::select (....). It works locally on my win 7 64 bit desktop just as before, both in (1) knit-Rmd file and (2) app.R that calls an Rmd file and generates an html report.

upload to shinyApps.io was successful as before ran the app and this time it produced a different effort message. See relevant lines from rsconnect::showLogs:

-----
: label: result_summary (with options) 
2020-02-14T22:32:20.533045+00:00 shinyapps[1814830]: List of 1
2020-02-14T22:32:20.533463+00:00 shinyapps[1814830]:  $ echo: logi FALSE
  |.........................                                             |  36%
shinyapps[1814830]:   ordinary text without R code
 
                                            |  37%
 label: modcoef (with options) 
 List of 2
 $ echo   : logi FALSE
 $ echo   : logi FALSE
 $ message: logi FALSE
 $ message: logi FALSE
 ordinary text without R code
..                                           |  39%
..                                           |  38%
 label: get_glance (with options) 
 List of 2
 $ echo   : logi FALSE
 $ message: logi FALSE
....                                          |  40%
ordinary text without R code
Warning: Error in : This tidyselect interface doesn't support predicates yet.
 ℹ Contact the package author and suggest using `eval_select()`.
 [No stack trace available]
 label: get_glance_A (with options) 
 List of 2
Quitting from lines 888-899 (FastRnD_beta_v_0.Rmd) 
----------

not sure what the Warning Error message means.

Any suggestions?