尝试在R中运行ERGM时出现奇怪错误

时间:2015-06-05 20:25:05

标签: r

我在R中有一个网络,以pajek(.net)协作格式化。我试图对它进行ergm分析。我已经格式化了类似的网络并成功运行了相同的命令,但是当我们扩展网络的大小时,这个错误就开始出现了。

   /**
    * This code is aimed at checking if the book is choseen and therefore whether any further works may be carried out
    */
    $session = new Session();
    if(!$session->get("App_Books_Chosen_Lp")) return new RedirectResponse($this->generateUrl('app_listbooks'));

    $request = $this->get('request');
    $em = $this->getDoctrine()->getManager();
    if($item_id != null)
    {
        /* THIS CODE IS NOT EXECUTED IN THE GIVEN CASE */
    }
    else 
    {
        // Add
        $item = new Items();
        $form = $this->createForm(new ItemsType(), $item);
        $form->add('save', 'submit', array('label' => 'Add item'));
    }
    $form->remove('documentid');
    $form->remove('book');
    $form->handleRequest($request);
    if ($form->isValid()) {

        if($item_id != null)
        {
            /* THIS CODE IS NOT EXECUTED IN THE GIVEN CASE */
        }
        else
        {
/* HERE ERROR OCCURS */
            // Add

            $book = $em->getReference('AppBundle:Books', $session->get("App_Books_Chosen_Lp"));
            if( $book ) $item->setBook($book);
            $doc = $em->getReference('AppBundle:Documents', $doc_id);
            if( $doc ) $item->setDocumentid($doc);
            $em->flush($item);
            $session = new session();
            $session->getFlashBag()->add('msg', 'Item was added.');
            $url = $this->generateUrl("app_documents_details", array("id" => $doc_id));
            return $this->redirect($url);
        }

是否有解决方法,无论是在格式方面还是在R内,都可以让我完成ERGM?

0 个答案:

没有答案