RExcel is an addin for Microsoft Excel that allows access to the statistics package R from within Excel.
Questions tagged [rexcel]
44 questions
0
votes
1 answer
Error: Workbook file name or sheet name to long, "file" has more than 54 characters
I've implemented some machine learning function into Excel, therefore, I used the RExcel add-in. Now I'm trying to predict classes based on certain input data. This input data is written in Excel. A macro read this input data and transforms it to R,…

karmabob
- 105
- 1
- 6
0
votes
0 answers
Solving equations with circular reference in R
I have a set of following equations:
x = 11y
y = x-5
The above equations are easy to solve if I rearrange the variables and solve using matrices. However, I want to pass the above equation as it is and solve them. Can someone suggest a way?

user3625024
- 319
- 1
- 2
- 11
0
votes
1 answer
Rexcel How do i loop in Rexcel using RRun?
For some reason I can't run a script using RunRFile so the next best thing was to type all my code as RRun requests. However I couldn't figure out how to loop.

user1627466
- 411
- 5
- 14
0
votes
1 answer
How to pass value from VBA variable to R in RExcel macro
I am new to writing RExcel macros, and I have a question. I am taking a user input from a macro through an InputBox(). The input is an integer. Then I want to pass this integer value to R.
This is my attempt:
Option Explicit
Sub…

DonaldS
- 13
- 4
0
votes
1 answer
RExcel How to execute a R code
I'm trying to execute a R code using Excel with the Rexcel tool.
I´ve created a button and an associate macro that executes the following code:
Sub button()
RInterface.StartRServer
RInterface.RunRFile…
0
votes
1 answer
Error with Rexcel when starting up Excel
Today something happened (never had this problem before) when I start up Excel workbook where I use Rexcel.
And then there are some more errors... Everything worked properly before.. Does anyone have an idea about what the problem could be?
The…

user1665355
- 3,324
- 8
- 44
- 84
0
votes
1 answer
Run macro with Rexcel
I am running a macro with Rexcel in VBA:
Sub create_efficient_frontier()
RInterface.StartRServer
Sheets("Analys").Range("A52:K82").ClearContents
RInterface.PutDataframe "datat", Range("ChosenData!X181:AD352")
RInterface.PutArray "startdate",…

user1665355
- 3,324
- 8
- 44
- 84
0
votes
0 answers
Replacing missing values in VBA while using RExcel
I am using Excel VBA and Rexcel.
Here is the code:
Sub CalcRets()
Dim outRange As Range
'ClearOutput
rinterface.StartRServer
rinterface.GetRApply "function(mydata)tryingf(mydata)", _
Range("predict!T17"),…

user1665355
- 3,324
- 8
- 44
- 84
0
votes
1 answer
writing VBA code to call R script
I've downloaded and installed Rconn as well as Rexcel. The API appears to be working as I am able to copy my code from R into Excel and then, through the use of the API GUI I am able to extract values for one of my matrices.
The problem I'm having…

Mike
- 1,049
- 5
- 20
- 46
0
votes
1 answer
VBA macro to automate Rexcel
I would like to use macros to run my Rexcel codes, so as to automate the process by the press of a button.
#!rput zz 'Sheet1'!$B$2:$B$1112
library(forecast)
zz <- ts(zz,freq=365,start=c(2007,121))
arimaz<- auto.arima(zz,d=1) …

siddharth
- 21
- 2
0
votes
1 answer
rExcel getarraytovba size limit
I've got some R code that returns a matrix that is 12 columns wide with over 1M rows. When I try to use getarraytovba to return that matrix into a VBA variant, it fails. When I say it fails I mean that it runs the code without generating any…

Dean MacGregor
- 11,847
- 9
- 34
- 72
-1
votes
1 answer
How select the excel sheet using for loop in R
I want the app that I am developing automatically go to the excel sheet and calculate the transition probability matrix.
action<-actions
state<-states
p<-array(0,c(length(state),length(state),length(action)))
colnames(p)=state
…

user
- 592
- 6
- 26
-1
votes
1 answer
Populating Excel Macro-enabled cells from R/outside environment
I have a macro-enabled template in excel that I wish to populate programmatically from R.
I have an R process that retrieves different set of data for every item I with to process, processes them, and then I want it to duplicate and populate the…

OmarSands
- 21
- 1
- 4
-2
votes
2 answers
Run R function in VBA macro
I'm trying to run a R code from excel VBA macro.
The R function is using two inputs: DataFilter(Input1,Input2)
The function does some filtering and then saves a new excel file in the folder
N:\DataFolder
Can you please help in creating an VBA macro…

lapioche75
- 87
- 1
- 2
- 9