omegahat / RDCOMClient

GNU General Public License v2.0
77 stars 34 forks source link

Update RDCOMClient #20

Open dkyleward opened 4 years ago

dkyleward commented 4 years ago

The first (minor) change was to make this an Rstudio package project, which made it easier for me to work with. Secondly, I changed a small section of converters.cpp. The call to UnList() was too heavy. When I returned a nested array like

{{1, 2}, {3, 4}}

it was being flattened into

{1, 2, 3, 4}

Removing that section resolved the issue, but of course, this no longer converts anything to R vectors automatically. I've found that calling unlist() in my R project code as needed is just fine. The other option would be to improve the logic of the if block. numDims == 1 && rtype != -1 wasn't quite right.

Finally, I noticed that after rebuilding the package in 3.6.1, I was no longer getting the errors referenced in omegahat/RDCOMClient#19.


This change is Reviewable

gwd666 commented 2 years ago

@dkyleward out of curiosity and judging by your comments do you "no longer" or "not" encounter

Error in createCOMReference(<pointer: 0x00000137dfcb6550>, "COMIDispatch") : 
  could not find function "createCOMReference"

issues? I am using RDCOMClient in one of my packages and therefore on the lookout for a "newer" or "more current" version then the one I am currently building against (because I am forced to upgrade to R-4 now and running into all types of warnings and errors)