REnvironment doAttachList(RList what, int pos, String name) {
REnvironment env = new REnvironment.NewEnv(name);
RStringVector names = (RStringVector) what.getNames();
for (int i = 0; i < names.getLength(); i++) {
env.safePut(names.getDataAt(i), what.getDataAt(i));
}
doAttachEnv(pos, env);
return env;
}