Re: Install a package from OSF

Shu Fai Cheung <[email protected]>
Newsgroups gmane.comp.lang.r.general
Message-ID <CAPVJd2VFK2SiuEBT6PbDWPRqEK0_5ZM7h_6i1f-jqKf1tkoNEg@mail.gmail.com>
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]]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.