rdrr-io / rdrr-issues

rdrr.io issues
34 stars 7 forks source link

Examples that actually work are needed throughout your website. #58

Open richlysakowski opened 4 years ago

richlysakowski commented 4 years ago

When I launch the examples in Jupyter Notebook, it NEVER works !! The required packages don't load and it always gives an error like 2. stop("'package' must be of length 1"). You must make the examples complete. Here is one example. Most of the others give the same error. I am using Chrome on Windows 10. If you are using Jupyter, you must load the R kernel.

entries: Converts a dictionary to a list of key/value pairs In stefano-meschiari/dict: A dictionary class for R Created from https://rdrr.io/github/stefano-meschiari/dict/man/entries.html on 2020-02-13 18:18:41.949856

library(stefano-meschiari/dict)
​
solar_system <- dict(Mercury = 0.387, Venus = 0.723, Earth = 1, Mars = 1.524)
for (e in entries(solar_system))
   cat('The distance between planet', e$key, ' and the Sun is', e$value, ' AU.\n')
​
inner_solar_system <- entries(solar_system) %>%
             keep(function(e) e$value <= 1) %>%
             collect()
​
Error in library(stefano - meschiari/dict): 'package' must be of length 1
Traceback:

1. library(stefano - meschiari/dict)
2. stop("'package' must be of length 1")
dwinsemius commented 1 year ago

This would require some sort accuracy check for github hosted documentation. At the moment examples are run on a defined environment when packages are submitted to CRAN but not when htey are submitted to GitHub. That example used incorrect syntax for the library call. If it had used install_github from ((cannot remember what package))) then it might have succeeded. Because rdrr-io uses a mixture of sources with varying standards of quality and consistency it is unable to meet these expectations of yours.