[R-pkg-devel] Package write access for storing new files
Dr Gregory Jefferis
je||er|@ @end|ng |rom mrc-|mb@c@m@@c@uk
Fri Dec 6 11:50:37 CET 2019
Possibly you can use the rappdirs location *if it exists* and tempdir()
otherwise. You could make the rappdirs location when running the shiny
app. Since the user has to do something to run the app, this is probably
ok. I think the problem is that loading the package itself cannot result
in a data download outside tempdir().
Best,
Greg.
On 6 Dec 2019, at 10:45, Rainer M Krug wrote:
> Thanks for the tip with rappdirs.
>
> I am just not sure, how I should handle the questions, as it should
> also run in a shiny application?
>
>
>
>> On 6 Dec 2019, at 10:12, Gregory Jefferis
>> <jefferis using mrc-lmb.cam.ac.uk> wrote:
>>
>> I use rappdirs to construct a platform appropriate consistent package
>> download directory. But for CRAN I believe you will need to obtain
>> some kind of user confirmation at least once to allow this behaviour.
>> Best, Greg.
>>
>> Sent from my iPhone
>>
>>> On 6 Dec 2019, at 08:43, Rainer M Krug <Rainer using krugs.de> wrote:
>>>
>>> Hi
>>>
>>> I am writing a package which downloads files which become part of
>>> the package (only useful for functions in the package and
>>> independent of the working directory) into
>>>
>>> system.file("installedSchemes", package = "dmdScheme")
>>>
>>> (See
>>> https://github.com/Exp-Micro-Ecol-Hub/dmdScheme/blob/b97e7b5ef116476e065aeec1da1050eecbd6adf7/R/scheme_install.R#L71-L75
>>> for the function).
>>>
>>> I know that is regulated for R packages, but I can’t find it.
>>>
>>> Is this allowed for R packages? Will this be allowed for CRAN?
>>>
>>> I would prefer not to allow custom paths here, as it would
>>> complicate things.
>>>
>>> Thanks,
>>>
>>> Rainer
>>>
>>>
>>> --
>>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
>>> Biology, UCT), Dipl. Phys. (Germany)
>>>
>>> Orcid ID: 0000-0002-7490-0066
>>>
>>> Department of Evolutionary Biology and Environmental Studies
>>> University of Zürich
>>> Office Y34-J-74
>>> Winterthurerstrasse 190
>>> 8075 Zürich
>>> Switzerland
>>>
>>> Office: +41 (0)44 635 47 64
>>> Cell: +41 (0)78 630 66 57
>>> email: Rainer.Krug using uzh.ch
>>> Rainer using krugs.de
>>> Skype: RMkrug
>>>
>>> PGP: 0x0F52F982
>>>
>>> ______________________________________________
>>> R-package-devel using r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>
> --
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
> Biology, UCT), Dipl. Phys. (Germany)
>
> Orcid ID: 0000-0002-7490-0066
>
> Department of Evolutionary Biology and Environmental Studies
> University of Zürich
> Office Y34-J-74
> Winterthurerstrasse 190
> 8075 Zürich
> Switzerland
>
> Office: +41 (0)44 635 47 64
> Cell: +41 (0)78 630 66 57
> email: Rainer.Krug using uzh.ch
> Rainer using krugs.de
> Skype: RMkrug
>
> PGP: 0x0F52F982
--
Gregory Jefferis, PhD Tel: +44 1223 267048
Division of Neurobiology
MRC Laboratory of Molecular Biology
Francis Crick Avenue
Cambridge Biomedical Campus
Cambridge, CB2 OQH, UK
http://www2.mrc-lmb.cam.ac.uk/group-leaders/h-to-m/g-jefferis
http://jefferislab.org
http://www.zoo.cam.ac.uk/research/groups/connectomics
More information about the R-package-devel
mailing list