Displaying 20 results from an estimated 900 matches similar to: "run query using rexcel runrfile and rodbc sql query"
2011 Sep 09
0
RExcel - RunRFile Errors
Hi,
I am using RExcel and trying to pass a line of code into R. When I select
the cell and choose "Run Code" from the RExcel menu then it seems to work
fine.
The problem I face is a need to write a macro to do this operation, as I
need to set up a user interface in excel for other users who don't know how
to use R.
In R to run my entire code I simply write on line:
2009 Feb 06
0
RExcel waiting for OLE action
When I run a macro that uses RExcel, I get a dialog box that says
"Microsoft Excel is waiting for another application to complete an OLE
action."
There is no error in the RExcel commands in the macro, of that I am sure.
The box appears to be related to the inclusion of RunRFile commands.
The macro will run through the second RunRFile command, but will not
execute the
2011 Apr 01
4
Rexcel path problem
Hi,
I am running a test to call an R script with in excel using VBA. My VBA
code is shown bellow. The middle section of this mail also includes the
content of my Rscript. The bottom part shows the error message form the
R console.
It seems that Excel is opening the R console without any problems.
The problem I am seeing is that Rinterface.RRun instruction is
interpreting the "\T"
2013 Oct 02
1
R Excel - Microsoft Excel is waiting for OLE action
Hi,
I am hoping you may be able to help please?
I am trying to use R Excel to run an R script using
"RInterface.RunRFile"
I have tested this command on basic scripts and they work fine. However
when I try to run quite a long script which runs a number of forecasts
using the forecast package, linear regressions and then tries to print
and excel workbook I get the error
Microsoft
2005 May 26
1
Help needed - Use of RSrvr in macro mode
Dear All,
I am experiencing a problem for which I need some help.
I have created a small file containing a simple function
File name = smalltest.r
Content :
smalltest=function(extvar)
{
itworks=paste('Ca marche',date())
setwd("c:/windows/temp")
write.table(itworks,file="resultat.csv", append=FALSE)
}
This function works when operated from R environment
To get
2010 Apr 18
2
how to use Excel VBA's Shell() to call and execute R file
I have an R file R_test.R saved in C:\R_test folder. The R_test.R looks like
this:
setwd("C:/R_test")
rnorm(100)
write(rnorm(100),"data.txt")
q(save="no", runLast = F)
Next I would like use an Excel VBA/macro Shell() function to call R and
execute R_test.R file. The syntax is *Shell(pathname*[*,windowstyle*]*)*
I wrote an Excel macro RunRcode like this:
Sub
2004 Oct 06
1
RExcel : problem with error handler?
Dear R-help,
Call RInterface.StartRServer ' Works fine
Call RInterface.RRun("objects()") ' Works fine
Call Rinterface.RRun( other R commands which do not generate errors, the
demos etc ) ' Works fine
But ...
Call RInterface.RRun("doesnotexist") ' Sends Excel into endless loop it
appears
After about 90 seconds a dialog box appears "Microsoft
2012 Mar 20
1
What is the correct syntax of "for" or "if" in Rexcel
Hello thankful R friends,
Can I use iteration (for) or conditional (if) syntax in rexcel using rrun?
I've finished coding my program and want to run through Excel.
I just want to run such as
Call rinterface.RRun("for(i in 1:10){")
Call rinterface.RRun("a[i,1]<-i")
Call rinterface.RRun("}")
But it doesn't work.
Any solution or trick to use "for"
2018 Mar 01
3
RExcel issues
Hi -
For a while I've used RExcel without problems to run a repeating portfolio optimization problem where I solve for a portfolio allocation targeting a particular risk, then solve for a different risk, etc. I call the commands with (e.g.) rinterface.Rrun "(R command)"
Recently that macro started blowing up, returning #RErrors, and when I try to trace the error I find that it is
2013 Aug 22
1
Rexcel
Hello,
I must tell you once again to address your questions to
r-help at r-project.org
And since there was no subject line, I've made up one.
Your question seems to be a question about excel, and I really can't
help you. Maybe someone else can.
But if you write.table(etszP) can't you read that file into excel?
Rui Barradas
Em 22-08-2013 15:57, siddhartha.geddam at eclerx.com
2018 Mar 01
0
RExcel issues
> On Mar 1, 2018, at 2:02 PM, Michael Ashton <m.ashton at enduringinvestments.com> wrote:
>
> Hi -
>
> For a while I've used RExcel without problems to run a repeating portfolio optimization problem where I solve for a portfolio allocation targeting a particular risk, then solve for a different risk, etc. I call the commands with (e.g.) rinterface.Rrun "(R
2008 Jun 05
1
R-code embedded in VBE -- Type mismatch errors
Hello,
I am trying to embed R-code inside VB for Excel (probably a perverse
endeavour anyway) and I am running into difficulties, especially when
passing vectors back and forth between the two environments.
(1) I am using the RExcel package.
(2) An example of error that I often get and that I can't seem to be able
to work myself around of is the following VB message:
------ Run-time
2008 Mar 20
2
I need help integrating ggplot2 into Excel
Dear all
I use ggplot2 extensively for my plotting routines and rexcel to have the
best of two worlds. (RExcel v 1.75 and R (D)Com v. 2.5)
I can run my ggplot functions, such as qplot(...), in scratchpad mode, but
not in Macro nor Worksheet functions mode.
I have tried the following in Macro mode:
Call RInterface.RRun("library(ggplot2)")
...
Call
2012 Oct 25
2
Egarch (1,1) with Student t distribution in RExcel
Hi
I want to implement Egarch (1,1) with t distribution model using RExcel and VBA.
May I know the syntax.
Following is the code that I 'm using.
rinterface.RRun "spec=ugarchspec(variance.model=list(model=(eGARCH),garchOrder=c(1,1)), mean.model=list(armaOrder=c(1,1), arfima=FALSE), distribution.model=(std))"
rinterface.RRun "fit = ugarchfit(Data = b, spec = spec)"
2005 Dec 31
1
r: RODBC QUESTION
hello all
i have a quick question. i have been using the RODBC library (trying to
read Excel data
into R but i am doing this by using Rexcel. this is probably not the
correct forum -
sorry for this).
my code is shown below:
Sub A()
'start the connection to R
Call RInterface.StartRServer
RInterface.RRun "library(RODBC)"
RInterface.RRun "A =
2013 Aug 22
0
Usage of ETS R codes through RExcel macros in VBA
Issue:
Usage of ETS R codes through RExcel macros in VBA
Given below is my command code:
Rinterface.runrcodefromrange Range(?Sheet1!B2:D8?)
Following are the codes written in the given cell reference:
#!rput zz 'Sheet1'!$B$2:$B$22
library(forecast)
zz <- ts(zz,freq=365,start=c(2009,1))
etsz <- ets(zz,model='AAN')
etszP <- forecast(etsz,h=34)
write.table(etszP)
How
2013 Aug 22
0
Rexcel macro query
*Issue:*
Usage of ETS R codes through RExcel macros in VBA
Given below is my command code:
Rinterface.runrcodefromrange Range(“Sheet1!B2:D8”)
Following are the codes written in the given cell reference:
#!rput
zz
'Sheet1'!$B$2:$B$22
library(forecast)
zz <- ts(zz,freq=365,start=c(2009,1))
etsz <- ets(zz,model='AAN')
etszP <- forecast(etsz,h=34)
2010 Apr 16
3
run R script from Excel VBA
I wrote a R script say called computeCovarMatrix.R and i want to call and
run this piece from Excel visual basic. does anyone know how to do that?
thanks,
KZ
[[alternative HTML version deleted]]
2012 May 21
16
Contactos en Madrid-ayuda con instalación
Hola a todos,
Mi nombre es Juanjo. Llevo un tiempo intentado hacer funcionar un programa
que necesita de la instalación de RPROJECT y REXCEL. He mirado varias guías
e instalado los programas pero obtengo varios errores.
El principal es que tras instalar RProject, Rexcel y statcon y al intentar
correr esta macro desde Visual Basic…
Sub Start()
RInterface.StartRServer
2010 Oct 30
1
R & VBA
Hi List,
Is there any way to pass on directly VBA variable content into a R variable?
on windows XP & using R 2.12.0
I have installed RExcel addin (with associated D(COM))
>> It function fine when trying to pass Excel Range to R but I failed (sorry if it is only my own limitation, search till now unsuccessful) to find out how to pass directly VBA array into R
Below an example -