The felp
package provides
?.
pseudo-post fix operator to simultaneously display a help document and a structure of an object?p
pseudo-post fix operator to display document of a packagefelp
function and ?
operator to extend help
and ?
in the utils
package by displaying structure of an objectfunction (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: 0x55631076cf38>
<environment: namespace:felp>
felp | R Documentation |
Structure of object is returned by str()
. For a function, its source is returned instead of str()
.
felp(topic, package = NULL, ...)
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 See ‘Details’ for what happens if this is omitted. |
package
|
a name or character vector giving the packages to look into for documentation, or |
…
|
Arguments passed on to
|
# Identical to help(identity); print(identity) felp(identity) # Identical to help(iris); str(iris) felp(iris) # Identical to help(package = MASS) felp(package = MASS)
List of 2
$ a: chr "a"
$ b: num 1
dummy | R Documentation |
A dummy data for felp
dummy
An object of class list
of length 2.
Information on package 'felp'
Description:
Package: felp
Type: Package
Title: Functional Help for Functions, Objects, and
Packages
Version: 0.2.2
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: Provides pseudo-postfix operators and more to
enhance displaying documents. 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
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 6.1.1
Imports: prettycode
Suggests: knitr, pkgdown, printr, roxygen2, testthat (>=
2.1.0), covr
VignetteBuilder: knitr
Language: en-US
Built: R 3.6.1; ; 2019-12-06 15:00:47 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