felp

library(felp)
library(printr) # To include documents output by `?` in this article

The felp package provides

Syntax

# ? as a prefix operator
?help
?utils::help

# ?. as a pseudo postfix operator for functions and objects
help?.
utils::help?.

# ?p as a pseudo postfix operator fur packages
utils?p

# felp as an extention of utils::help
felp(help)
felp("help")
felp(utils::help)
felp(help, utils)
felp(package = utils)

felp(function)

felp?. # and `felp(felp)` return source and document of `felp` function
function (topic, package = NULL, ...) 
{
    if (missing(topic)) 
        return(do.call(help, list(package = substitute(package), 
            ...)))
    t <- rev(as.character(substitute(topic)))
    p <- c(as.character(substitute(package)), t[2L])[1L]
    if (is.na(p)) 
        p <- NULL
    str(get(t[1L], envir = if (is.null(p)) 
        parent.frame()
    else asNamespace(p)))
    try(help(t[1L], p[1L], ...))
}
<bytecode: 0x55b57d462ed8>
<environment: namespace:felp>
felpR Documentation

Functional help which displays structure of an object in addition to help

Description

Structure of object is returned by str(). For a function, its source is returned instead of str().

Usage

felp(topic, package = NULL, ...)

Arguments

topic

usually, a name or character string specifying the topic for which help is sought. A character string (enclosed in explicit single or double quotes) is always taken as naming a topic.

If the value of topic is a length-one character vector the topic is taken to be the value of the only element. Otherwise topic must be a name or a reserved word (if syntactically valid) or character string.

See ‘Details’ for what happens if this is omitted.

package

a name or character vector giving the packages to look into for documentation, or NULL. By default, all packages whose namespaces are loaded are used. To avoid a name being deparsed use e.g. (pkg_ref) (see the examples).

...

Arguments passed on to utils::help

lib.loc

a character vector of directory names of R libraries, or NULL. The default value of NULL corresponds to all libraries currently known. If the default is used, the loaded packages are searched before the libraries. This is not used for HTML help (see ‘Details’).

verbose

logical; if TRUE, the file name is reported.

try.all.packages

logical; see Note.

help_type

character string: the type of help required. Possible values are "text", "html" and "pdf". Case is ignored, and partial matching is allowed.

Examples

# Identical to help(identity); print(identity)
felp(identity)

# Identical to help(iris); str(iris)
felp(iris)

# Identical to help(package = stats)
felp(package = stats)


felp(dataset)

dummy?. # and `felp(dummy)` return sructure and document of `dummy` dataset.
List of 2
 $ a: chr "a"
 $ b: num 1
dummyR Documentation

A dummy data for felp

Description

A dummy data for felp

Usage

dummy

Format

An object of class list of length 2.

felp(package)

felp?p # and `felp(package = felp)` return document of `felp` package
        Information on package 'felp'

Description:

Package:           felp
Type:              Package
Title:             Functional Help for Functions, Objects, and Packages
Version:           0.5.0
Author:            Atsushi Yasumoto [aut, cph, cre]
                   (<https://orcid.org/0000-0002-8335-495X>)
Authors@R:         c( person( given = "Atsushi", family = "Yasumoto",
                   role = c("aut", "cph", "cre"), email =
                   "atusy.rpkg@gmail.com", comment = c(ORCID =
                   "0000-0002-8335-495X") ) )
Maintainer:        Atsushi Yasumoto <atusy.rpkg@gmail.com>
Description:       Enhance R help system by fuzzy search and preview
                   interface, pseudo-postfix operators, and more.  The
                   `?.` pseudo-postfix operator and the `?` prefix
                   operator displays documents and contents (source or
                   structure) of objects simultaneously to help
                   understanding the objects.  The `?p` pseudo-postfix
                   operator displays package documents, and is shorter
                   than help(package = foo).
URL:               https://github.com/atusy/felp
BugReports:        https://github.com/atusy/felp/issues
License:           MIT + file LICENSE
Encoding:          UTF-8
Roxygen:           list(markdown = TRUE)
RoxygenNote:       7.2.3
Imports:           prettycode, callr, curl, data.table, dplyr,
                   htmltools, magrittr, matrixStats, miniUI, reactable,
                   rstudioapi, rlang, shiny, stringi, utils
Suggests:          knitr, printr, testthat (>= 2.1.0), covr, rmarkdown
VignetteBuilder:   knitr
Language:          en-US
Built:             R 4.3.3; ; 2024-04-18 15:02:11 UTC; unix

Index:

?                       Functional help with ? operator
dummy                   A dummy data for felp
felp                    Functional help which displays structure of an
                        object in addition to help
fuzzyhelp               Fuzzily Search Help and View the Selection