Comments (14)
Closing this is OK. It answers this one question: can drat be used to build a repository that can be given as Additional_repositories
in package DESCRIPTION
. The answer is "NO".
from drat.
How did you documented to install the package from your drat?
Did it make difference if user uses https
or http
?
I recall that install.packages(method="curl")
sometimes helped on such error.
I used drat, tools::write_PACKAGES
, and Additional_repository
field and never had problem that I couldn't fix, so forgetting drat (or tools::write_PACKAGES
essentially) shouldn't be necessary.
from drat.
@jarioksa the answer is yes, try
Additional_repositories: https://jarioksa.github.io/drat
from drat.
curl
should be baked into more recent R versions.
from drat.
Windows definitely works. I have setup a number of drat
repos for different projects and have at times clearly provided Windows binaries that way.
I guess you "just" have to debug exactly what the structure is that Windows expects. drat
itself has no opinion in the matter -- it just helps you. It calls the underlying base R function write_PACKAGES()
for you and helps with a few other things.
One thing to check is that basic drat
operations are for source *.tar.gz
packages, Windows expects binaries in *zip
format unless told to look at sources. You need to take care of those details and e.g. have appropriate binaries built. Or tell users to use sources.
from drat.
I did not document that install by any means, except
- People install another package with
devtools::install_github
- and that another package has
Additional_repositories
directive inDESCRIPTION
pointing to drat.
The failure comes from that Additional_repositories
because it emerged even when people did not need to use that drat repository.
I had hoped that this was invisible magic for users. It was, but visible & black magic.
from drat.
I think you fundamentally misunderstand something.
Let's get back to the Alice and Bob example.
Alice is a package author. She writes packages. Some on CRAN, some elsewhere. She hosts some packages on GitHub, and may be a drat
user to make maintaining that R-compatible repo trivially easy.
Bob uses some of Alice's packages. He may never have heard of drat
nor used it. But he uses R, and download.packages()
, however invoked, may get him packages that are hosted somewhere with the help of drat
.
Hope this helps. You users do not need to know drat
.
As I see no actionable item here, shall we close this?
from drat.
Come on @jarioksa there is an entire paper on the topic for the special case of a data package repository (but that is still a package repository) -- maybe you could read that?
https://journal.r-project.org/archive/2017/RJ-2017-026/index.html
from drat.
Another working example: https://github.com/jangorecki/big.data.table/blob/master/DESCRIPTION
Lookup .gitlab-ci.yml
for usage when installing. Although I haven't used with devtools::install_github
but utils::install.packages
.
from drat.
install_github()
is fundamentally different as it takes a source repo -- I have argued for years that that is potentially bad idea, however common the use is -- whereas the approach heres supports R packages. drat
allows you to extend operations you would otherwise do with officials repos like CRAN or BioC in a self-controlled repo, and Additional_repositories:
is the hook R allows for automagically pull it packages from a Suggests:
.
from drat.
Note that Additional_repositories
is currently used only for package check (see WRE). If you want to use that information for automatic dependency resolution you have to code that. I submit proposal to base R to provide such information to user https://github.com/wch/r-source/compare/tools4pkgs#diff-c610281df0839138574292846834cbc5R447-R461
but it wasn't merged.
from drat.
Thanks for these. I try to follow these guidelines. I cannot test them myself because everything worked for me all the time: it were the users that ran into trouble and reported their failures. I'll wait for their reports of success (I hope).
from drat.
@jarioksa Sounds good. All this can indeed be a little tricky -- it helps to step back. Deep down what we do here uses base R unaltered so everything replies on plain R operations with repos. We "just" plug into the one or two interfaces we can play with:
- explicitly listing repositories (as CRAN alternatives, say, or local repos, or ...)
- allow CRAN packages to have external Suggests: via
Additional_repositories:
.
No more, no less. You can maybe work out what it is that you want to do, what is missing currently and if and how drat
can help (as it has for dozens and dozens of projects). Good luck.
from drat.
@eddelbuettel I was not shouting "BUG!", and my intention was not suggest there was something wrong in drat. I assumed all the time that either I was missing something or that there are some strange interactions or assumptions buried in devtools or Windows 10, but I wished somebody would know and lead me to the light. Thanks.
from drat.
Related Issues (20)
- Add new draft vignette on 'step-by-step' demo of `drat` HOT 1
- Convert other vignettes to `minidown::water` HOT 1
- install.packages("drat") fails: `Error : object 'update_PACKAGES' is not exported by 'namespace:tools'` HOT 5
- Problem with link checker in r-devel HOT 3
- Nearing drat 0.2.0 release with main branch docs/ directory support HOT 1
- drat 0.2.0: breaking change if `dratBranch = "main"` HOT 8
- missing getPackageInfo in 0.2.0 HOT 7
- Importing and using large data R package HOT 2
- Insert binary packages to wrong repository on ARM M1 Mac HOT 25
- insertPackage is very slow when using networked windows devices HOT 7
- insertPackage is slow for cloud-based file shares HOT 3
- sorry HOT 1
- Can old package versions be removed from drat folder? HOT 6
- pruneRepo fails with for package type mac.binary.big-sur-arm64 HOT 1
- minor typo HOT 3
- Broken link in doc ? HOT 3
- Possible discrepancy between where drat and CRAN places binaries when .Platform$pkgType is "mac.binary.big-sur-x86_64" HOT 14
- drat 0.2.4 release HOT 1
- [windows] Create repository using local server HOT 8
- installing package p2data HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drat.