New function to initialize d4storagehub4R.
This commit is contained in:
parent
4f21089103
commit
362007112b
|
@ -17,6 +17,10 @@ print(paste(""))
|
|||
print(paste("You can also access, read and write any folder of your workspace"))
|
||||
print(paste("by loading - and using - the package 'd4storagehub4R'"))
|
||||
print(paste("developed by E. Blondel, with source code available at https://github.com/eblondel/d4storagehub4R"))
|
||||
print(paste("To create the manager to interact with the Workspace, use the R code: storagehub = initStoragehubManager()"))
|
||||
print(paste("For more info about methods available to interact with workspace,"))
|
||||
print(paste("consult the documentation at ?d4storagehub4R::StoragehubManager"))
|
||||
print(paste(""))
|
||||
print(paste("It is recommended to save any worth maintaining file into the workspace to persist it."))
|
||||
print(paste("The persistence of files stored elsewhere is not guaranteed."))
|
||||
print(paste("***********************************************"))
|
||||
|
@ -37,11 +41,12 @@ options(repos = c(CRAN = 'https://packagemanager.rstudio.com/cran/__linux__/foca
|
|||
# https://docs.rstudio.com/rspm/admin/serving-binaries/#binaries-r-configuration-linux
|
||||
options(HTTPUserAgent = sprintf("R/%s R (%s)", getRversion(), paste(getRversion(), R.version["platform"], R.version["arch"], R.version["os"])))
|
||||
Sys.setlocale(category = "LC_ALL", locale = "en_US.UTF-8")
|
||||
print(paste(""))
|
||||
initStoragehubManager = function(){
|
||||
require(d4storagehub4R)
|
||||
# more information at ?StoragehubManager
|
||||
# print(paste(""))
|
||||
# print(paste("Run the following code to initialize the StoragehubManager:"))
|
||||
# print(paste('WORKSPACE = d4storagehub4R::StoragehubManager$new(token_type = "jwt", token = Sys.getenv("D4SCIENCE_TOKEN"))'))
|
||||
# print(paste(""))
|
||||
|
||||
storagehub <- d4storagehub4R::StoragehubManager$new(
|
||||
token_type = "jwt", token = Sys.getenv("D4SCIENCE_TOKEN")
|
||||
)
|
||||
return(storagehub)
|
||||
}
|
||||
print(paste("Using Locale Encoding:",Sys.setlocale("LC_CTYPE","en_US.UTF-8")));
|
||||
|
|
Loading…
Reference in New Issue