(This is not a duplicate of Reading Rds file from git)
Is there a way of reading an .rds
file in R (or any other file) from a specific git commit without having to checkout the commit nor create a temporary file (not from GitHub, but for example from a bare or non-bare repo saved locally or on a server)?
I tried the following, but not surprisingly it does not work (assuming you have a git repo with some commits and a file a.rds
):
b <- readRDS(system("git show 9358:a.rds"))
> Error in readRDS(system("git show 9358:a.rds")) :
invalid 'description' argument