Select Git revision
jsonfortran-config.cmake.in
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
util.R 631 B
randomized_sleep <- function() {
wait_time <- sample(seq(5, 10, 0.5), 1) # generate random number between 5 and 10
print(paste0("Waiting ", wait_time, " seconds")) # print waiting
Sys.sleep(wait_time) # wait
}
getCurrentFileLocation <- function()
{
this_file <- commandArgs() %>%
tibble::enframe(name = NULL) %>%
tidyr::separate(col=value, into=c("key", "value"), sep="=", fill='right') %>%
dplyr::filter(key == "--file") %>%
dplyr::pull(value)
if (length(this_file)==0) # if called out of R studio
{
this_file <- rstudioapi::getSourceEditorContext()$path
}
return(dirname(this_file))
}