Package org.renjin.primitives.packaging

Examples of org.renjin.primitives.packaging.Namespace


  @Ignore("todo")
  @Test
  public void test() throws Exception {
   
    Context tlContext = Context.newTopLevelContext();
    Namespace ns = tlContext.getNamespaceRegistry().createNamespace(new TestPackage());
   
    Context ctx = tlContext.beginEvalContext(ns.getNamespaceEnvironment());
    ctx.evaluate(RParser.parseSource("f <- function(x) x*x*42\n"));
   
    File envFile = File.createTempFile("nstest", ".RData");
    envFile.deleteOnExit();
   
    LazyLoadFrameBuilder builder = new LazyLoadFrameBuilder(tlContext);
    builder.outputTo(envFile);
    builder.build(ns.getNamespaceEnvironment());
   
    // now reload into a new context
    tlContext = Context.newTopLevelContext();
    tlContext.getNamespaceRegistry().createNamespace(new TestPackage());
   
View Full Code Here


      return;
    }
   
    Context context = initContext();

    Namespace namespace = context.getNamespaceRegistry().createNamespace(new InitializingPackage(name));
    evaluateSources(context, getRSources(), namespace.getNamespaceEnvironment());
    serializeEnvironment(context, namespace.getNamespaceEnvironment(), environmentFile);
  }
View Full Code Here

TOP

Related Classes of org.renjin.primitives.packaging.Namespace

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.