How to convert R variable to Excel variable & vice versa
I want to know some code about Rexcel. Please if you can respond, it will be great helpful for me. Problem is that the conversion of Excel (type of) variable to R (type of) variable. Suppose I have written the code in VBA.
Option Base 1
Dim x(5) As Integer
x(1) = 10
x(2) = 20
x(3) = 30
x(4) = 40
x(5) = 50
RInterface.RRun "Nt<- x" 'I want to store 3rd element of an array by using R
'& also if possible I want to show this value by msgbox
I think x() array is an Excel type and we will have to convert it to R type of array i.e. vector. The question is How?
and again I want to perform some action on 'Nt' through excel VBA, then again we will have to convert this R type of Variable to Excel type.
Am i right?
Please suggest me some way how to do these things.