diff --git a/NEWS.md b/NEWS.md index 1798add..12eb73a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,6 @@ # felp 0.2.0 -# Major changes +## Major changes - `felp()` and `?` returns structure of a value specified to the first argument if possible. If function is specified, the source of function is returned diff --git a/docs/articles/felp.html b/docs/articles/felp.html index 6d042e9..6fa6b07 100644 --- a/docs/articles/felp.html +++ b/docs/articles/felp.html @@ -112,23 +112,22 @@

felp(function)

felp?. # and `felp(felp)` return source and document of `felp` function
-
function(topic, package = NULL, ...) {
-  # Display package document
-  if (missing(topic)) return(do.call(help, list(package = substitute(package), ...)))
-
-  # Convert `package::name` to c("name", "package", "`::`") or `name` to "name"
-  t <- rev(as.character(substitute(topic)))
-
-  p <- c(as.character(substitute(package)), t[2L])[1L]
-  if (is.na(p)) p <- NULL
-
-  # Display structure and document of an object
-  str(get(t[1L], envir = `if`(is.null(p), parent.frame(), asNamespace(p))))
-
-  try(help(t[1L], p[1L], ...))
-}
-<bytecode: 0x560d6d766b10>
-<environment: namespace:felp>
+
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: 0x5650e9d5d598>
+<environment: namespace:felp>
- +
@@ -277,24 +276,38 @@

Description: -Package: felp -Type: Package -Title: Functional help for functions, objects, and - packages -Version: 0.2.0 -Author: YASUMOTO Atsushi -Maintainer: YASUMOTO Atsushi <atusy7+felp@gmail.com> -Description: `help?.` works as if `?help` and `felp?p` works - as if `help(package = felp)`. -License: MIT + file LICENSE -Encoding: UTF-8 -LazyData: true -Roxygen: list(markdown = TRUE) -RoxygenNote: 6.1.1 -Imports: prettycode -Suggests: knitr, pkgdown, printr, rmarkdown, roxygen2 -VignetteBuilder: knitr -Built: R 3.6.0; ; 2019-05-26 00:49:37 UTC; unix +Package: felp +Type: Package +Title: Functional help for functions, objects, and + packages +Version: 0.2.0 +Author: YASUMOTO Atsushi +Maintainer: YASUMOTO Atsushi <atusy7+felp@gmail.com> +Description: This package extends utils::`?` by + pseudo-postfix operators `?.` for objects and + `?p` for packages. For objects, a result of + `str` or `print.function` is also displayed. +License: MIT + file LICENSE +Encoding: UTF-8 +LazyData: true +Roxygen: list(markdown = TRUE) +RoxygenNote: 6.1.1 +Imports: prettycode +Suggests: knitr, pkgdown, printr, rmarkdown, roxygen2 +VignetteBuilder: knitr +RemoteType: github +RemoteHost: api.github.com +RemoteRepo: felp +RemoteUsername: atusy +RemoteRef: master +RemoteSha: f03cc64e28e7f1a37e653ba406e905b854b33e1f +GithubRepo: felp +GithubUsername: atusy +GithubRef: master +GithubSHA1: f03cc64e28e7f1a37e653ba406e905b854b33e1f +NeedsCompilation: no +Packaged: 2019-05-26 01:24:04 UTC; rstudio +Built: R 3.6.0; ; 2019-05-26 01:24:05 UTC; unix Index: diff --git a/docs/index.html b/docs/index.html index cf35396..1b7083e 100644 --- a/docs/index.html +++ b/docs/index.html @@ -10,7 +10,7 @@ - + @@ -30,7 +30,7 @@ - + @@ -101,7 +101,7 @@
diff --git a/docs/reference/index.html b/docs/reference/index.html index 151fb91..ffd3213 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -126,7 +126,7 @@

felp()

Functional help which displays structure an object in addition to help

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

diff --git a/man/felp.Rd b/man/felp.Rd index 3f9e279..01bf47c 100644 --- a/man/felp.Rd +++ b/man/felp.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/felp.R \name{felp} \alias{felp} -\title{Functional help which displays structure an object in addition to help} +\title{Functional help which displays structure of an object in addition to help} \usage{ felp(topic, package = NULL, ...) }