Re: Install a package from OSF

CALUM POLWART <[email protected]>
Newsgroups gmane.comp.lang.r.general
Message-ID <CA+etgP=+tcykbL5jZ-pZZ464SmTthjdSrjm6ZycszX7MtGfYyw@mail.gmail.com>
I suspect you need to download the file and install it. Perhaps the
extension isn't being added as .zip

download.file(URL, "temp.zip")
install.pacakages("temp.zip", repos=NULL)

Might be possible to pipe that?

On Sun, 28 Sept 2025, 13:54 Shu Fai Cheung, <[email protected]> wrote:

> Hi All,
>
> 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? For example, something like this, from the help
> of remotes::install_url():
>
> remotes::install_url("https://github.com/hadley/stringr/archive/HEAD.zip")
>
> I tried the following (the link is a fake one, just for illustration):
>
> remotes::install_url("https://osf.io/abcde/download?view_only=abcdefg")
>
> I confirmed in a browser that the link with "/download" added is a
> direct link to download the file created by R CMD build.
>
> However, I got the following error:
>
> Error: Failed to install 'unknown package' from URL:
>   Don't know how to decompress files with extension
>
> Is there another way to install a package directly from OSF?
>
> Regards,
> Shu Fai
>
>         [[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.
>

	[[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.