Running examples in ‘Rgretl-Ex.R’ failed
The error most likely occurred in:

> ### Name: run_grcli
> ### Title: running gretl scripts
> ### Aliases: run_grcli
> 
> ### ** Examples
> 
> # The differences with the native gretl script are:
> # (i) name of character vector (gr.script <- here)
> # (ii) quotes: for make hansl code a character string;
> #      quotes inside script should be escaped, e.g. 
> #      text <- "eval \"hello, word\""
> gr.script <- 
+ "open denmark.gdt -q
+ ols diff(LRY) 0 diff(LRM) IBO --simple-print
+ restrict --silent
+ b[2] + b[3] = 0.3
+ end restrict
+ pv = $pvalue
+ if pv > 0.05
+ restrict --full
+ b[2] + b[3] = 0.3
+ end restrict
+ set warnings off
+ modtest --white-nocross 
+ endif"
> run_grcli(gr.script)
Read datafile /usr/share/gretl/data/misc/denmark.gdt

OLS, using observations 1974:2-1987:3 (T = 54)
Dependent variable: d_LRY

             coefficient   std. error   t-ratio   p-value
  -------------------------------------------------------
  const       0.00782134   0.0175792     0.4449   0.6583 
  d_LRM       0.357288     0.102011      3.502    0.0010  ***
  IBO        -0.0487789    0.108745     -0.4486   0.6556 

SSR = 0.0258871, R-squared = 0.243180

Restriction:
 b[d_LRM] + b[IBO] = 0.3

Test statistic: F(1, 51) = 0.00232352, with p-value = 0.961743


Model 2: Restricted OLS, using observations 1974:2-1987:3 (T = 54)
Dependent variable: d_LRY

             coefficient   std. error   t-ratio   p-value 
  --------------------------------------------------------
  const       0.00854576   0.00903173    0.9462   0.3484  
  d_LRM       0.353227     0.0569734     6.200    9.30e-08 ***
  IBO        -0.0532271    0.0569734    -0.9342   0.3545  

Mean dependent var   0.002725   S.D. dependent var   0.025404
Sum squared resid    0.025888   S.E. of regression   0.022313
Log-likelihood       129.7369   Akaike criterion    -255.4738
Schwarz criterion   -251.4959   Hannan-Quinn        -253.9397

P-value was highest for variable 3 (IBO)


White's test for heteroskedasticity (squares only)
OLS, using observations 1974:2-1987:3 (T = 54)
Dependent variable: uhat^2
Omitted due to exact collinearity: const

             coefficient    std. error    t-ratio    p-value
  ----------------------------------------------------------
  const      -6.79677e-05   0.00200358   -0.03392    0.9731 
  d_LRM       9.57314e-05   0.00336869    0.02842    0.9774 
  IBO         0.00213736    0.0266308     0.08026    0.9364 
  sq_d_LRM    0.198414      0.0525628     3.775      0.0004  ***
  sq_IBO     -0.000448152   0.0860421    -0.005209   0.9959 

  Unadjusted R-squared = 0.327909

Test statistic: TR^2 = 17.707100,
with p-value = P(Chi-square(4) > 17.707100) = 0.001408

> 
> Rz = run_grcli('print w v x\n eval x**y\n z = mexp(y)\n print z',
+            input = list(matr = list(w = 1,v = 1:4, x= matrix(1:2,1),
+            y = matrix(rep(1,9),3))),
+            output = list(matr = "z"))
Data error
Warning in file(file, "rt") :
  cannot open file '/tmp/Rtmpe6VH63/grm_outfile_012341.txt': No such file or directory
Error in file(file, "rt") : cannot open the connection
Calls: run_grcli -> unname -> as.matrix -> read.table -> file
Execution halted