mdequeljoe / rdoc Goto Github PK
View Code? Open in Web Editor NEWcolourised R docs in the terminal
colourised R docs in the terminal
In a fresh R session:
> rdoc::rdoc(MASS::bcv)
Error in dirname(path) : a character vector argument expected
It works nicely once the package is loaded:
> library(MASS)
> rdoc::rdoc(bcv)
Not sure what to do about this, maybe rdoc could depend on utils, but maybe you could just document it in the README?
I.e. to make sure rdoc is used I have this in the profile:
library(utils)
rdoc::use_rdoc()
First of all, this is an awesome update to the default pager. Bravo.
I noticed that you currently leave links in the markdown format. While this is somewhat useful, I was wondering if there was a way that we could also suppress it to get back to the bare approach provided by the default pager.
Thanks!
A frequent complaint about R documentation is that the examples are at the very end of the documentation, and often people learn best by example.
Perhaps rdoc could move the examples section to just below the description? Maybe controllable by an option if people want to preserve the default ordering.
This is maybe not sg that should be fixed here, but in pkgload, just wanted to make note of it. pkgload also has ?
, to render development documentation, and this overrides rdoc.
@jimhester do you think that there is an easy workaround for this?
I have this:
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pkg-dependencies.R
\name{pkg_deps}
\alias{pkg_deps}
\title{R6 class for package dependency lookup}
\description{
Create a \code{pkg_deps} object to look up dependencies of R packages.
}
\details{
The usual steps to query package dependencies are...
}
\section{Methods}{\preformatted{pkg_deps$new()
pkg_deps$get_refs()
pkg_deps$get_config()
pkg_deps$resolve()
pkg_deps$async_resolve()
pkg_deps$get_resolution()
pkg_deps$solve()
pkg_deps$get_solution()
pkg_deps$draw()
pkg_deps$format()
pkg_deps$print()
}
}
and utils::help()
formats it correctly:
...
Methods:
pkg_deps$new()
pkg_deps$get_refs()
pkg_deps$get_config()
pkg_deps$resolve()
pkg_deps$async_resolve()
pkg_deps$get_resolution()
pkg_deps$solve()
pkg_deps$get_solution()
pkg_deps$draw()
pkg_deps$format()
pkg_deps$print()
...
But rdoc removes the newlines for some reason:
Methods
pkg_deps$new() pkg_deps$get_refs() pkg_deps$get_config() pkg_deps$resolve() pkg_deps$async_resolve()
pkg_deps$get_resolution() pkg_deps$solve() pkg_deps$get_solution() pkg_deps$draw() pkg_deps$format()
pkg_deps$print()
Any ideas? Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.