Commits

Neal Richardson authored 84668627a80
ARROW-7789: [R] Can't initialize arrow objects when R.oo package is loaded R's S3 method dispatch is a double-edged sword: it lets us define methods for classes in other packages, but it also means that methods defined in other packages can dispatch on our objects--there's no (official) namespacing of classes, it's all by class name. The `R.oo` package defines methods for a class called `Object`. When that package is loaded, those methods will be applied to all of the `arrow` package classes too because we have a base class named `Object`. Most of these are irrelevant for us but `R.oo` has a `$<-` assignment method that makes assumptions about the object that aren't appropriate for our objects, and this causes an error when we try to instantiate an arrow Object. This patch has two fixes: 1. A one-liner in `Object$set_pointer` to use `assign` instead of `<-` to set the pointer. This does fix the error that was reported, and it future-proofs us in case we decide to add `<-` methods to arrow objects in the future (e.g. to add a field to a schema, or a column to a table). 2. Renaming the arrow `Object` base class to `ArrowObject`. This is probably the correct fix so that we disambiguate the classes. Closes #6497 from nealrichardson/r-oo and squashes the following commits: f65de157c <Neal Richardson> rename Object class to ArrowObject f651f60f4 <Neal Richardson> Use assign to avoid <- method in Object creation Authored-by: Neal Richardson <neal.p.richardson@gmail.com> Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>