Open RStudio Console and run:
install.packages("remotes")
remotes::install_github("kasinathca/rpackage-adv")
library(mypackage)If the package is private, set a GitHub token first:
Sys.setenv(GITHUB_PAT = "YOUR_PERSONAL_ACCESS_TOKEN")
remotes::install_github("kasinathca/rpackage-adv")library(mypackage)
s <- list_scripts()
length(s) # expected: 88
head(s, 88)s <- list_scripts()
print(s)
# Better table view:
data.frame(index = seq_along(s), script = s)Open in editor:
view_script("exp_1_1_3d_array_creation")Print in console:
view_script("exp_1_1_3d_array_creation", print_only = TRUE)run_script("exp_1_1_3d_array_creation")Each script contains a header section named Required packages with install commands as comments.
To inspect dependency comments for one script:
scripts_dir <- system.file("scripts", package = "mypackage")
readLines(file.path(scripts_dir, "exp_4_12_ggplot_scatter_pop_vs_gdppercap_1952.R"), n = 25)If a script fails with "there is no package called ...", install the missing package and rerun:
install.packages("ggplot2")
# then
run_script("exp_4_12_ggplot_scatter_pop_vs_gdppercap_1952")remotes::install_github("kasinathca/rpackage-adv", force = TRUE)install.packages("mypackage_0.1.0.tar.gz", repos = NULL, type = "source")
library(mypackage)# all Experiment 4 scripts
grep("^exp_4_", list_scripts(), value = TRUE)
# scripts related to shiny, clustering, ggplot
grep("shiny|cluster|ggplot", list_scripts(), value = TRUE)