ScPoEcon / ScPoEconometrics

Undergraduate textbook for Econometrics with R
https://ScPoEcon.github.io/ScPoEconometrics/
Other
141 stars 68 forks source link

aboutApp returns wrong error message #78

Closed floswald closed 6 years ago

floswald commented 6 years ago

this:

> aboutApp("regression")
Error: Please run `launchApp()` with a valid app as an argument.
Valid apps are: 'anscombe', 'confidence_intervals', 'corr_continuous', 'datasaurus', 'demeaned_reg', 'multicollinearity', 'reg_constrained', 'reg_dummy', 'reg_dummy_example', 'reg_full', 'reg_multivariate', 'reg_simple', 'reg_standardized', 'rescale', 'sampling', 'SSR_cone', 'standard_errors_changeN', 'standard_errors_simple'

needs to be changed to

  # locate all the shiny app examples that exist
valid <- character(0)
  v <- list.files(system.file("shinys", package = "ScPoEconometrics"),full.names=TRUE)
for (i in v){
# if i has an about.Rmd
if (file.exists(file.path(i,"about.Rmd"))){
valid <- c(valid,basename(i)
}}