jonkeane commented on a change in pull request #8579:
URL: https://github.com/apache/arrow/pull/8579#discussion_r517366041
##########
File path: r/R/table.R
##########
@@ -254,6 +257,49 @@ names.Table <- function(x) x$ColumnNames()
#' @export
`[[.Table` <- `[[.RecordBatch`
+#' @export
+`[[<-.Table` <- function(x, i, value) {
+ if (is.null(value)) {
+ if (is.character(i)) {
+ i <- match(i, names(x)) - 1L
+ }
+ x <- x$RemoveColumn(i)
+ } else {
+ if (!is.character(i)) {
+ # get or create a/the column name
+ if (i <= ncol(x)) {
Review comment:
I went looking for a function call to `num_columns()` and should have
looked for an active binding, oops!
----------------------------------------------------------------
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]