Skip to content

Commit

Permalink
Merge branch 'master' into ShowError#5604
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwellfundi authored Feb 3, 2020
2 parents 1ad7b66 + 2262d16 commit e3e6754
Show file tree
Hide file tree
Showing 419 changed files with 12,920 additions and 23,083 deletions.
6 changes: 3 additions & 3 deletions docs/Download.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@
<div class="col-lg-8 col-lg-offset-2 text-center">
<h2 class="section-heading">Download R-Instat</h2>
<hr class="light">
<p>If this is your first time downloading R-Instat, we recommend you <a href="http://bit.ly/2Jl5Byo" style="color:blue;" target="_blank">download the Complete Installer</a>. The Complete Installer is the same version of R-Instat as the Basic Installer but also includes the required version of R (3.6.0 currently) to run R-Instat.</p>
<p>If this is your first time downloading R-Instat, we recommend you <a href="http://bit.ly/33O7Z87" style="color:blue;" target="_blank">download the Complete Installer</a>. The Complete Installer is the same version of R-Instat as the Basic Installer but also includes the required version of R (3.6.0 currently) to run R-Instat.</p>
<p>If you do not know if you have the latest version of R, download the Complete Installer. The Basic Installer does not include R.</p>
<p>R-Instat is currently a Windows only application. However, it can be accessed on Mac or Linux through use of a Virtual Windows Machine.</p>
<p><a href="http://bit.ly/2Jl5Byo" style="color:blue;" target="_blank">R-Instat 0.5.4 Complete Installer (.exe 577MB)</a></p>
<p><a href="http://bit.ly/2ph63H1" style="color:blue;" target="_blank">R-Instat 0.5.4 Basic Installer (.msi 499MB)</a></p>
<p><a href="http://bit.ly/33O7Z87" style="color:blue;" target="_blank">R-Instat 0.5.5 Complete Installer (.exe 594MB)</a></p>
<p><a href="http://bit.ly/2sI7CiE" style="color:blue;" target="_blank">R-Instat 0.5.5 Basic Installer (.msi 516MB)</a></p>

<h2 class="section-heading">Installation & Documentation</h2>
<hr class="light">
Expand Down
2 changes: 1 addition & 1 deletion instat/clsGridLink.vb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Public Class clsGridLink
clsGetCombinedMetadata.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_combined_metadata")
clsSetMetadataChanged.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$set_metadata_changed")

If frmMain.clsRLink.bInstatObjectExists Then
If frmMain.clsRLink.bInstatObjectExists AndAlso frmMain.clsRLink.GetDataFrameCount() > 0 Then
expTemp = frmMain.clsRLink.RunInternalScriptGetValue(clsDataChanged.ToScript())
If expTemp IsNot Nothing AndAlso expTemp.Type <> Internals.SymbolicExpressionType.Null Then
bRDataChanged = expTemp.AsLogical(0)
Expand Down
34 changes: 27 additions & 7 deletions instat/clsRLink.vb
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ Public Class RLink
Dim clsPNGFunction As New RFunction
Dim strTempAssignTo As String = ".temp_val"
Dim bSuccess As Boolean
Dim bError As Boolean = False

strTempGraphsDirectory = System.IO.Path.Combine(System.IO.Path.GetTempPath() & "R_Instat_Temp_Graphs")
strOutput = ""
Expand Down Expand Up @@ -558,7 +559,7 @@ Public Class RLink
strSplitScript = Left(strScript, strScript.Trim(Environment.NewLine.ToCharArray).LastIndexOf(Environment.NewLine.ToCharArray))
If strSplitScript <> "" Then
Try
Evaluate(strSplitScript, bSilent:=bSilent, bSeparateThread:=bSeparateThread, bShowWaitDialogOverride:=bShowWaitDialogOverride)
bError = Not Evaluate(strSplitScript, bSilent:=bSilent, bSeparateThread:=bSeparateThread, bShowWaitDialogOverride:=bShowWaitDialogOverride)
Catch e As Exception
MsgBox(e.Message & Environment.NewLine & "The error occurred in attempting to run the following R command(s):" & Environment.NewLine & strScript, MsgBoxStyle.Critical, "Error running R command(s)")
End Try
Expand All @@ -567,12 +568,16 @@ Public Class RLink
strCapturedScript = "capture.output(" & strSplitScript & ")"
End If
Try
Evaluate(strTempAssignTo & " <- " & strCapturedScript, bSilent:=bSilent, bSeparateThread:=bSeparateThread, bShowWaitDialogOverride:=bShowWaitDialogOverride)
expTemp = GetSymbol(strTempAssignTo)
If expTemp IsNot Nothing Then
strTemp = String.Join(Environment.NewLine, expTemp.AsCharacter())
If strTemp <> "" Then
strOutput = strOutput & strTemp & Environment.NewLine
If Not bError Then
If Evaluate(strTempAssignTo & " <- " & strCapturedScript, bSilent:=bSilent, bSeparateThread:=bSeparateThread, bShowWaitDialogOverride:=bShowWaitDialogOverride) Then
expTemp = GetSymbol(strTempAssignTo)
Evaluate("rm(" & strTempAssignTo & ")", bSilent:=True)
If expTemp IsNot Nothing Then
strTemp = String.Join(Environment.NewLine, expTemp.AsCharacter())
If strTemp <> "" Then
strOutput = strOutput & strTemp & Environment.NewLine
End If
End If
End If
End If
Catch e As Exception
Expand Down Expand Up @@ -1082,6 +1087,21 @@ Public Class RLink
Return bExists
End Function

Public Function GetDataFrameCount() As Integer
Dim iCount As Integer
Dim clsDataFrameCount As New RFunction
Dim expCount As SymbolicExpression

clsDataFrameCount.SetRCommand(strInstatDataObject & "$dataframe_count")
expCount = RunInternalScriptGetValue(clsDataFrameCount.ToScript(), bSilent:=True)
If expCount IsNot Nothing AndAlso Not expCount.Type = Internals.SymbolicExpressionType.Null Then
iCount = expCount.AsInteger(0)
Else
iCount = 0
End If
Return iCount
End Function

Public Function GetDataFrameLength(strDataFrameName As String, Optional bUseCurrentFilter As Boolean = False) As Integer
Dim iLength As Integer
Dim clsDataFrameLength As New RFunction
Expand Down
33 changes: 18 additions & 15 deletions instat/dlgBarAndPieChart.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e3e6754

Please sign in to comment.