nealrichardson commented on a change in pull request #9170:
URL: https://github.com/apache/arrow/pull/9170#discussion_r556107770



##########
File path: r/R/arrow-package.R
##########
@@ -76,6 +76,39 @@ option_use_threads <- function() {
   !is_false(getOption("arrow.use_threads"))
 }
 
+#' Report information on the package's capabilities
+#'
+#' This function summarizes a number of build-time configurations and run-time
+#' settings for the Arrow package. It may be useful for diagnostics.
+#' @return A list including version information, boolean "capabilities", and
+#' statistics from Arrow's memory allocator.
+#' @export
+#' @importFrom utils packageVersion
+arrow_info <- function() {
+  opts <- options()
+  out <- list(
+    version = packageVersion("arrow"),

Review comment:
       I think the special object is more useful because you can do `>` etc. 
methods with it. And the first line in its print method is as.character() so I 
think we're ok there, unless there's a scenario I'm missing:
   
   ```r
   print.numeric_version <- function (x, ...) {
       y <- as.character(x)
       if (!length(y)) 
           writeLines(gettext("<0 elements>"))
       else if (any("quote" == names(list(...)))) 
           print(ifelse(is.na(y), NA_character_, sQuote(y)), ...)
       else print(ifelse(is.na(y), NA_character_, sQuote(y)), quote = FALSE, 
           ...)
       invisible(x)
   }
   ```
   
   What we really should do is add an S3 class to this object and make a print 
method for it, like `sessionInfo()`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to