Package r.data.RArray

Examples of r.data.RArray.Names


                        content[j] = base.getRAny(j);
                    }
                    for (; j < nsize; j++) {
                        content[j] = RList.NULL;
                    }
                    Names bnames = base.names();
                    return RList.RListFactory.getFor(content, null, bnames == null ? null : expandNames(bnames, nsize), base.attributesRef());
                    // drop dimensions
                } else {
                    return base;
                }
View Full Code Here


            return RList.RListFactory.getScalar(base.getRAny(keep)); // shallow
                                                                     // copy
        }

        public static RAny deleteElement(RList base, String index) {
            Names names = base.names();
            int deleteIndex = -1;
            if (names != null) {
                deleteIndex = names.map(RSymbol.getSymbol(index));
            }
            if (deleteIndex != -1) {
                return deleteElement(base, deleteIndex);
            } else {
                return Utils.dropDimensions(base);
View Full Code Here

                        ntrue++;
                        selected[vi] = true;
                    }
                }
            }
            Names names = base.names();
            RSymbol[] symbols = names == null ? null : names.sequence();

            if (!hasNegative) {
                int nullsToAdd = 0;
                if (maxIndex > (bsize + 1)) {
                    // there were indexes "above" the base vector, but perhaps not all were mentioned
View Full Code Here

            }
            int vsize = typedValue != null ? typedValue.size() : listValue.size();
            if (!hasNegative) {
                if (hasNA && vsize > 1) { throw RError.getNASubscripted(ast); }
                int nsize = maxIndex;
                Names names = base.names();
                boolean expanding = false;
                boolean copying = true;
                RArray res;
                if (nsize <= bsize) {
                    nsize = bsize;
View Full Code Here

        public static RAny genericUpdate(RArray base, int pos, RAny value, boolean subset, ASTNode ast) {
            // FIXME: avoid some copying here but careful about lists
            RArray typedBase;
            Object rawValue;
            int[] dimensions = base.dimensions();
            Names names = base.names();

            if (value instanceof RList) { // FIXME: this code gets copied around a few times, could it be refactored without a performance penalty?
                if (base instanceof RList) {
                    typedBase = base;
                } else {
View Full Code Here

TOP

Related Classes of r.data.RArray.Names

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.