Changeset View
Standalone View
swh/lister/rcran/list_all_the_packages.R
- This file was added.
Property | Old Value | New Value |
---|---|---|
File Mode | null | 100755 |
#!/usr/bin/Rscript | |||||
douardda: please add a small comment that explains (one sentence should be enough) what this script does… | |||||
db <- tools::CRAN_package_db() | |||||
dbjson <- jsonlite::toJSON(db) | |||||
write(dbjson, stdout()) | |||||
Done Inline ActionsThat is sort-of the opposite of what I meant :) _if_ you really want this on stdout, fine _but_ maybe you would rather communicate by file? I do not know as I do not know the SWH protocol and API. Lastly, the data structure has 65 columns, and R is best equipped to deal with R data. If any subsequent work is needed, we should do it here. eddelbuettel: That is sort-of the opposite of what I meant :)
_if_ you really want this on stdout, fine… | |||||
Done Inline ActionsAs discussed on IRC,
There are some of the columns that are not required but they are not causing any harm in further processing. and there is no separate code to remove them either. nahimilega: As discussed on IRC,
> there's no point going through a temporary file - @olasd
There are… | |||||
No newline at end of file | |||||
Done Inline ActionsThis print() to stdout; it would be easy to change to save to a (given or fixed) filename. R code does not need trailing semicolons. eddelbuettel: This `print()` to `stdout`; it would be easy to change to save to a (given or fixed) filename. |
please add a small comment that explains (one sentence should be enough) what this script does (even if it is quite simple).