Try

         Dim metricSurface As Variant

Without the parentheses.



Ryan Sheftel wrote:
> 
> I am trying to use the GetArrayToVBA for a large dataframe in R into
> Excel VBA.
> 
> In R the dataframe "metricSurface" is a large (12 cols, 32760 rows) data
> frame.
> 
> I use the following in VBA to retrieve it:
> 
>         Dim metricSurface() As Variant
>         metricSurface =
> rinterface.GetArrayToVBA("as.matrix(metricSurface)")
> 
> But when it runs I get an Microsoft Visual Basic error:
> 
>         "Run-time error '13': Type mismatch"
> 
> This is very odd given that the type of the metricSurface variable is
> variant, I cannot understand where the type mismatch is.
> 
> Thanks for your help.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Rcom-l mailing list
> Rcom-l@mailman.csd.univie.ac.at
> http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l
> More information (including a Wiki) at http://rcom.univie.ac.at


-- 
Erich Neuwirth, University of Vienna
Faculty of Computer Science
Computer Supported Didactics Working Group
Visit our SunSITE at http://sunsite.univie.ac.at
Phone: +43-1-4277-39464 Fax: +43-1-4277-39459
_______________________________________________
Rcom-l mailing list
Rcom-l@mailman.csd.univie.ac.at
http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l
More information (including a Wiki) at http://rcom.univie.ac.at

Reply via email to