Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sourcing R code #135

Open
yteo opened this issue Jun 15, 2023 · 1 comment
Open

Sourcing R code #135

yteo opened this issue Jun 15, 2023 · 1 comment

Comments

@yteo
Copy link

yteo commented Jun 15, 2023

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
Copy link
Collaborator

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)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants