private void btborrarObjeto_Click(object sender, EventArgs e) { if (lstObjetos.SelectedItem.ToString() != null) { //borramos un objeto sc1.EvaluateNoReturn("rm(" + lstObjetos.SelectedItem + ")"); TOC.Remove(lstObjetos.SelectedItem.ToString()); lstObjetos.Items.Remove(lstObjetos.SelectedItem); lstCampos.Items.Clear(); } }
/// <summary> /// executes R script - doesn't return result /// </summary> /// <param name="strRScript"></param> /// <returns></returns> public bool ExecuteRScriptNoResult(string strRScript) { try { m_strError = null; if (m_rServer == null) { throw new Exception("R-Client is not initialized."); } try { m_rServer.EvaluateNoReturn(strRScript); } catch { throw new Exception(this.Error); } return(true); } catch (Exception exception) { throw new Exception("Exception in CRClient::ExecuteRScriptNoResult()", exception); } }