autstat Support

icon
Avatar
benmarjot
Posts: 7
Hi Thomas,

I have recently started to have a problem with my R connection. I am using the foreground R Type, and my code seems to execute fine but I cannot return data to Excel using GetArray and GetDataFrame.

Below is my macro:
Sub RandomMatrix()
Dim rintf As RInterface
Set rintf = New RInterface
rintf.RRun "RandomMatrix <- matrix(rnorm(9), ncol = 3)"
rintf.GetArray "RandomMatrix", Range("Sheet4!B2:D4")
End Sub

I can see the object RandomMatrix in my R window:
> RandomMatrix
[,1] [,2] [,3]
[1,] 1.9480616 0.6431035 0.91678190
[2,] -0.5752321 -0.0548050 -0.04544778
[3,] 0.2750655 -0.5455678 0.09748478

But Sheet4 remains blank.

Below is the debugging information when I first connect to R, I think the problem may be in the last line regarding BDX functions.

Windows version: Version 1607 (OS Build 14393.1770)

> R.Version()$version.string
[1] "R version 3.3.2 (2016-10-31)"
> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 10 x64 (build 14393)

locale:
[1] LC_COLLATE=English_United Kingdom.1252
[2] LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] rcom_3.1-3 rscproxy_2.1-3

loaded via a namespace (and not attached):
[1] shiny_1.0.5 R6_2.2.0 htmltools_0.3.6 Rcpp_0.12.9
[5] digest_0.6.12 xtable_1.8-2 httpuv_1.3.5 mime_0.5
> installed.packages()["rscproxy",]
Package
"rscproxy"
LibPath
"C:/Users/marjotb/Documents/R/R-3.3.2/library"
Version
"2.1-3"
Priority
NA
Depends
NA
Imports
NA
LinkingTo
NA
Suggests
NA
Enhances
NA
License
"statconnDCOM PUBLIC LICENSE"
License_is_FOSS
NA
License_restricts_use
NA
OS_type
NA
MD5sum
NA
NeedsCompilation
NA
Built
"3.3.0"
> installed.packages()["rcom",]
Package LibPath
"rcom" "C:/Users/marjotb/Documents/R/R-3.3.2/library"
Version Priority
"3.1-3" NA
Depends Imports
"R (>= 3.3.0), rscproxy (>= 2.1-1), utils" NA
LinkingTo Suggests
"rscproxy" NA
Enhances License
NA "file LICENSE"
License_is_FOSS License_restricts_use
NA NA
OS_type MD5sum
"windows" NA
NeedsCompilation Built
NA "3.3.0"

> R.Version()$version.string
[1] "R version 3.3.2 (2016-10-31)"
> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 10 x64 (build 14393)

locale:
[1] LC_COLLATE=English_United Kingdom.1252
[2] LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] rcom_3.1-3 rscproxy_2.1-3

loaded via a namespace (and not attached):
[1] shiny_1.0.5 R6_2.2.0 htmltools_0.3.6 Rcpp_0.12.9
[5] digest_0.6.12 xtable_1.8-2 httpuv_1.3.5 mime_0.5
> installed.packages()["rscproxy",]
Package
"rscproxy"
LibPath
"C:/Users/marjotb/Documents/R/R-3.3.2/library"
Version
"2.1-3"
Priority
NA
Depends
NA
Imports
NA
LinkingTo
NA
Suggests
NA
Enhances
NA
License
"statconnDCOM PUBLIC LICENSE"
License_is_FOSS
NA
License_restricts_use
NA
OS_type
NA
MD5sum
NA
NeedsCompilation
NA
Built
"3.3.0"
> installed.packages()["rcom",]
Package LibPath
"rcom" "C:/Users/marjotb/Documents/R/R-3.3.2/library"
Version Priority
"3.1-3" NA
Depends Imports
"R (>= 3.3.0), rscproxy (>= 2.1-1), utils" NA
LinkingTo Suggests
"rscproxy" NA
Enhances License
NA "file LICENSE"
License_is_FOSS License_restricts_use
NA NA
OS_type MD5sum
"windows" NA
NeedsCompilation Built
NA "3.3.0"


DebugView Info:
[14972] BDX_get_vtbl2: conn=R:dm=2, licensee=SExcel4, objptr=41D85850, version=1, path=(null)
[14972] BDX: DateTime enabled
[14972] BDX: Special .NET features enabled
[14972] BDX: x86 support (32bit) enabled
[14972] BDX: #0/1512604800/0
[14972] statconnDCOM BDX: could not get BDX functions from <C:\Program Files (x86)\statconn\DCOM\bin\SCTools.dll> by calling "_BDX_get_vtbl2@20", rc=ffffffff

Any help would be much appreciated.

Regards,
Ben
2017-12-21 15:58
Avatar
Thomas Baier
Moderator
Posts: 222
Dear Ben,

I can see two problems there:

1. it looks as if an outdated version of statconnDCOM is installed
2. rscproxy not installed in the correct directory.

Please download and unpack the "Setup Test/Maintenance Tool". Then run it and choose "Analyze System" in the dropdown list and click on "Start". This might provide some additonal insight into installation problems.

Please also report the version of statconnDCOM installed.

Thomas
2017-12-21 19:40
icon