Azure / AzureStor

R interface to Azure storage accounts
Other
64 stars 20 forks source link

Sourcing R code #135

Open yteo opened 1 year ago

yteo commented 1 year ago

Switching from AWS to Azure and trying to understand if there is an equivalence of s3source in the AzureStor package? I am trying to source an R code directly from a blob. Thanks!

hongooi73 commented 1 year ago

No, but you can download to a temp file and source that. Here's a simple function to do this and clean up afterward:

azure_source <- function(cont, file)
{
  dest <- tempfile(fileext=".R")
  on.exit(unlink(dest))
  storage_download(cont, file, dest)
  source(dest)
}