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 <[email protected]> wrote:

> В Sun, 28 Sep 2025 20:53:46 +0800
> Shu Fai Cheung <[email protected]> пишет:
>
> > 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]]

______________________________________________
[email protected] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide https://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to