[R] Install a package from OSF

Shu Fai Cheung @hu|@|@cheung @end|ng |rom gm@||@com
Mon Sep 29 02:13:39 CEST 2025


Interesting! I tried, and this method indeed works!

remotes::install_url("https://osf.io/download/FILE_ID/?_=.tar.gz")

Many thanks for this simple workaround!

Regards,
Shu Fai


On Sun, Sep 28, 2025 at 10:33 PM Ivan Krylov <ikrylov using disroot.org> wrote:

> В Sun, 28 Sep 2025 20:53:46 +0800
> Shu Fai Cheung <shufai.cheung using gmail.com> пишет:
>
> > I would like to let reviewers download and install a package from
> > OSF. It is for double-blind review, and so I need to create an
> > anonymized version at OSF. I can ask reviewers to download the file
> > and install it locally. However, the reviewers may not be familiar
> > with this. Is it possible to do this in one function call?
>
> If the package has no non-base dependencies,
> install.packages("https://osf.io/download/FILE_ID/", type = 'source',
> repos = NULL) may work.
>
> > remotes::install_url("https://osf.io/abcde/download?view_only=abcdefg")
>
> > However, I got the following error:
> >
> > Error: Failed to install 'unknown package' from URL:
> >   Don't know how to decompress files with extension
>
> You can also try tricking remotes::install_url() by adding a query
> string parameter that OSF will ignore, something like (untested)
> remotes::install_url("https://osf.io/download/FILE_ID/?_=.tar.gz") or
> (closer to your case)
> remotes::install_url("
> https://osf.io/abcde/download?view_only=abcdefg&_=.tar.gz").
>
> --
> Best regards,
> Ivan
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list