Exemplo n.º 1
0
 public Builder add(String name, SEXP value) {
   SEXP tag = Null.INSTANCE;
   if (!Strings.isNullOrEmpty(name)) {
     tag = Symbol.get(name);
   }
   return add(tag, value);
 }
Exemplo n.º 2
0
 public static PairList fromVector(Vector vector) {
   Builder builder = new Builder();
   for (int i = 0; i != vector.length(); ++i) {
     String name = vector.getName(i);
     if (Strings.isNullOrEmpty(name)) {
       builder.add(vector.getElementAsSEXP(i));
     } else {
       builder.add(name, vector.getElementAsSEXP(i));
     }
   }
   return builder.build();
 }