Remove a tab R file and remove from the tabs.csv config file

removeSpsTab(
  tab_id = "none",
  force = FALSE,
  app_path = getwd(),
  multiple = FALSE,
  verbose = spsOption("verbose"),
  colorful = spsOption("use_crayon")
)

Arguments

tab_id

tab ID, string, length 1, supports regular expressions, so be careful. If more than one tabs are matched, stop by default

force

bool, whether to ask for confirmation

app_path

app directory

multiple

bool, if matched more than one tab, turn this to TRUE can remove more than one tab at a time. Be careful.

verbose

bool, follows project setting, but can be overwrite. TRUE will give you more information

colorful

bool, whether the message will be colorful?

Value

remove the tab file and register info in tabs.csv

Examples

spsInit(change_wd = FALSE, overwrite = TRUE)
#> [SPS-INFO] 2021-09-18 02:42:25 Start to create a new SPS project
#> [SPS-INFO] 2021-09-18 02:42:25 Create project under /home/runner/work/systemPipeShiny/systemPipeShiny/docs/reference/SPS_20210918
#> [SPS-INFO] 2021-09-18 02:42:25 Now copy files
#> [SPS-INFO] 2021-09-18 02:42:25 Create SPS database
#> [SPS-INFO] 2021-09-18 02:42:25 Created SPS database method container
#> [SPS-INFO] 2021-09-18 02:42:25 Creating SPS db...
#> [SPS-DANGER] 2021-09-18 02:42:26 Done, Db created at '/home/runner/work/systemPipeShiny/systemPipeShiny/docs/reference/SPS_20210918/config/sps.db'. DO NOT share this file with others or upload to open access domains. #> [SPS-INFO] 2021-09-18 02:42:26 Key md5 1add293ce2f142e6935a3bc0e23ed828 #> [SPS-INFO] 2021-09-18 02:42:26 SPS project setup done!
spsNewTab("vs_new", app_path = glue::glue("SPS_{format(Sys.time(), '%Y%m%d')}"))
#> [SPS-INFO] 2021-09-18 02:42:26 Write to file SPS_20210918/R/tab_vs_new.R
#> [SPS-INFO] 2021-09-18 02:42:26 Now register your new tab to config/tab.csv
#> [SPS-SUCCESS] 2021-09-18 02:42:26 New tab created! #> [SPS] 2021-09-18 02:42:26 To load this new tab: `sps(tabs = c("vs_new")`
removeSpsTab("vs_new", force = TRUE, app_path = glue::glue("SPS_{format(Sys.time(), '%Y%m%d')}"))
#> Warning: One or more parsing issues, see `problems()` for details
#> [SPS-INFO] 2021-09-18 02:42:26 Matched tab(s): vs_new
#> [SPS-INFO] 2021-09-18 02:42:26 1 tabs removed from tabs.csv
#> [SPS-INFO] 2021-09-18 02:42:26 Now remove file SPS_20210918/R/tab_vs_new.R
#> [SPS-SUCCESS] 2021-09-18 02:42:26 Removal complete