Giter Club home page Giter Club logo

Comments (1)

Dasonk avatar Dasonk commented on July 1, 2024

I'm not at a computer I can easily test this but if you just want to get the help from a function as text you can use tools::Rd2txt to create a text file from the Rd files in a package. That's basically what happens when your help_type is set to 'text' with a bit of additional magic to use an appropriate pager to display the file. I'm guessing the issue. Although that might be beyond what you care about - I was assuming you'd want more control over what gets printed but if you just want to allow the output to be displayed in the console you could use a similar trick that I use to display help files in html vignettes in my docstring package. If you do this:

console_pager <- function(x, ...){
    input <- readLines(x)
    # Had some issues with _� getting displayed
    # in the output console output which
    # messed up rendering in the created html vignette
    # So remove that before outputting.
    input <- gsub("_�", "", input)
    cat(paste(input,collapse="\n"), "\n")}
options(pager=console_pager)

then having the help file display directly in a console works just fine.

It seems to me that one might want to write their own documentation if using aargh though since you might be doing something that isn't just a direct call to a built in function. My docstring package might be useful to use in conjunction with aargh in those cases. If that sounds like something you think users might want to do and have trouble getting it working I'd be more than happy to help with that.

from aargh.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.