paleolimbot commented on a change in pull request #11690:
URL: https://github.com/apache/arrow/pull/11690#discussion_r751461832



##########
File path: r/R/dplyr-functions.R
##########
@@ -250,6 +250,27 @@ nse_funcs$is_logical <- function(x, n = NULL) {
   nse_funcs$is.logical(x)
 }
 
+# Create a data frame/tibble/struct column
+nse_funcs$tibble <- function(...) {
+  # use dots_list() because this is what tibble() uses to allow the
+  # useful shorthand of tibble(col1, col2) -> tibble(col1 = col1, col2 = col2_)
+  args <- rlang::dots_list(..., .named = TRUE)
+
+  build_expr(
+    "make_struct",
+    args = unname(args),
+    options = list(field_names = names(args))
+  )
+}
+
+nse_funcs$data.frame <- function(..., stringsAsFactors = FALSE) {

Review comment:
       Right now you'd get a column named `check.names`... Probably better to 
`arrow_not_supported()` here?




-- 
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.

To unsubscribe, e-mail: [email protected]

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


Reply via email to