Is there a limit on the size of the string that you can use when using "BERT.Call".
I'm generating a long string in VBA (517 characters) which causes the application to hang. If I paste the string into the BERT console it works. However when I submit it from VBA it causes an issue.
The example below assumes the library heemod has been called.
The code below works in R studio, and works from the BERT console, but does not work when you assign it to a string and use BERT.Call.
The only work around I can think of is to write the string to a file, and then source the file.
param <- define_parameter(age_init=60, sex=0,age=age_init+markov_cycle,omrPTHR=0.02,omrRTHR=0.02,rrr=0.04,cons=-5.49094,ageC=-0.0367,maleC=0.768536,lambda=exp(cons+ageCage_init+maleCsex),gamma=1.45367786,rrNP1=0.260677,standardRR=1-exp(lambda*((markov_cycle-1)^gamma-markov_cycle^gamma)),np1RR=1-exp(lambdarrNP1((markov_cycle-1)^gamma-markov_cycle^gamma)),sex_cat=ifelse(sex==0,'FMLE','MLE'),mr=get_who_mr(age,sex_cat,country='GBR',local=TRUE),u_SuccessP=0.85,u_RevisionTHR=0.3,u_SuccessR=0.75,c_RevisionTHR=5294)
Is there a limit on the size of the string that you can use when using "BERT.Call".
I'm generating a long string in VBA (517 characters) which causes the application to hang. If I paste the string into the BERT console it works. However when I submit it from VBA it causes an issue.
The example below assumes the library heemod has been called.
The code below works in R studio, and works from the BERT console, but does not work when you assign it to a string and use BERT.Call.
The only work around I can think of is to write the string to a file, and then source the file.
param <- define_parameter(age_init=60, sex=0,age=age_init+markov_cycle,omrPTHR=0.02,omrRTHR=0.02,rrr=0.04,cons=-5.49094,ageC=-0.0367,maleC=0.768536,lambda=exp(cons+ageCage_init+maleCsex),gamma=1.45367786,rrNP1=0.260677,standardRR=1-exp(lambda*((markov_cycle-1)^gamma-markov_cycle^gamma)),np1RR=1-exp(lambdarrNP1((markov_cycle-1)^gamma-markov_cycle^gamma)),sex_cat=ifelse(sex==0,'FMLE','MLE'),mr=get_who_mr(age,sex_cat,country='GBR',local=TRUE),u_SuccessP=0.85,u_RevisionTHR=0.3,u_SuccessR=0.75,c_RevisionTHR=5294)