diff --git a/.Rbuildignore b/.Rbuildignore index 51433e6..90b5bb3 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -6,4 +6,4 @@ ^\.github$ ^.*\.Rproj$ ^\.Rproj\.user$ -*.html \ No newline at end of file +.*\.html$ \ No newline at end of file diff --git a/modules/github_usernames.csv b/inst/extdata/github_usernames.csv similarity index 100% rename from modules/github_usernames.csv rename to inst/extdata/github_usernames.csv diff --git a/modules/_github_username.Rmd b/modules/_github_username.Rmd index b8370d6..e44e018 100644 --- a/modules/_github_username.Rmd +++ b/modules/_github_username.Rmd @@ -1,7 +1,8 @@ ```{r github-username-setup, include=FALSE} # Read GitHub usernames from CSV tryCatch({ - github_users <- read.csv("github_usernames.csv", stringsAsFactors = FALSE) + csv_path <- system.file("extdata", "github_usernames.csv", package = "quiz") + github_users <- read.csv(csv_path, stringsAsFactors = FALSE) # Create choices with display format: "First Last (username)" username_choices <- setNames( github_users$GitHub.Username, @@ -40,7 +41,8 @@ div( # Read GitHub usernames in server context username_choices <- reactive({ tryCatch({ - github_users <- read.csv("modules/github_usernames.csv", stringsAsFactors = FALSE) + csv_path <- system.file("extdata", "github_usernames.csv", package = "quiz") + github_users <- read.csv(csv_path, stringsAsFactors = FALSE) # Create choices with display format: "First Last (username)" setNames( github_users$GitHub.Username,