Ejemplo n.º 1
0
 @Specialization
 protected Object getDimNames(RAbstractContainer container) {
   controlVisibility();
   RList names;
   if (container instanceof RDataFrame) {
     dataframeProfile.enter();
     names = ((RDataFrame) container).getVector().getDimNames();
   } else if (container instanceof RFactor) {
     factorProfile.enter();
     names = ((RFactor) container).getVector().getDimNames();
   } else {
     otherProfile.enter();
     names = container.getDimNames(attrProfiles);
   }
   return nullProfile.profile(names == null) ? RNull.instance : names;
 }
Ejemplo n.º 2
0
 @Specialization(guards = "isLengthOne(lengthVector)")
 protected RAbstractContainer updateLength(
     RAbstractContainer container, RAbstractIntVector lengthVector) {
   controlVisibility();
   return container.resize(lengthVector.getDataAt(0));
 }