Skip to content

Commit

Permalink
Updates for clean var labels - Code modified and moved from Quarto in…
Browse files Browse the repository at this point in the history
…dex file to fetch.R script.
  • Loading branch information
alex-vand committed Sep 17, 2024
1 parent 9fca17c commit 730c500
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
14 changes: 1 addition & 13 deletions index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,7 @@ For a human-curated list of health economics R packages, please visit the [getst
This project was started as part of a R-HTA Hackathon held at the University of Belfast on 5th and 6th August 2024.

```{r}
dat <- read.csv("data/data.csv")
#PLACEHOLDER - WILL MOVE TO PROCESSING SCRIPTS
names(dat) <- c("Package",
"Title",
"Description",
"License",
"Authors",
"Maintainer",
"Date published (CRAN)",
"Has tests?",
"Has Vingettes?",
"# contributors",
"On CRAN?")
dat <- read.csv("data/data.csv", check.names = FALSE)
DT::datatable(dat,
options = list(
scrollX = TRUE,
Expand Down
14 changes: 14 additions & 0 deletions scripts/fetch.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,19 @@ all_names <- unique(unlist(lapply(package_metadata, names)))
filled_list <- lapply(package_metadata, fill_na, all_names = all_names)
# Create combined data frame of package metadata.
df <- dplyr::bind_rows(lapply(filled_list, as.data.frame))
# Clean variable labels
var_names <- c("Package",
"Title",
"Description",
"License",
"Authors",
"Maintainer",
"Date published (CRAN)",
"Has tests?",
"Has Vingettes?",
"# Contributors",
"# Repo stars",
"On CRAN?")
names(df) <- var_names
# Write combined data frame to file as csv.
write.csv(df, "data/data.csv", row.names = FALSE)

0 comments on commit 730c500

Please sign in to comment.