sdllc / Basic-Excel-R-Toolkit

http://bert-toolkit.com
207 stars 40 forks source link

problem with bert module #47

Open abdoulmeow11 opened 7 years ago

abdoulmeow11 commented 7 years ago

Hi, i am using Bert in french, and i am having some issue when loadind a vba code like application.run("R.bertfunction"), i have this message when opening Bert console : "Warning: l'espace de nom 'BERTModule' n'est pas disponible et a �t� remplac� par .GlobalEnv lors du traitement de l'objet 'EXCEL'" does anyone knows why ? Thanks in advance

duncanwerner commented 7 years ago

That looks like a problem in the function itself. What's in the function?

Autre question: est-ce qu'il utilise les lettres utf8 correctement? je pensais que cela fonctionne.

abdoulmeow11 commented 7 years ago

Hi, i have created a lot of functions on bert , for example there is this function vblibre : vblibre=function(a){ proportion=Get.Range("Versements!Q3"); versement=Get.Range("Versements!R3") prop=a*proportion; v=sample(1:a,prop); v1=rep(0,a); v1[v]=versement; v1; } and then to call it on excel i do this : Sub vlibre() Range("Versements!T5:T2002").Value = 10 Range("Versements!T5:T2002") = Application.Run("R.vblibre", 1998) End Sub it works some time, but some time not, when you close the file and open it later it puts you: Erreur d'exécution '50290' Erreur défine par l'application ou par l'objet

abdoulmeow11 commented 7 years ago

the line "Range("Versements!T5:T2002").Value = 10" is useless here i've just put it there to do some test

duncanwerner commented 7 years ago

I can't get this to break. Are you using the latest version of BERT (1.51)? This sounds like #39 which was fixed recently.