search for: rrun

Displaying 20 results from an estimated 21 matches for "rrun".

Did you mean: run
2008 Dec 16
1
surface contour plot help
...X                  Y(1)             Z(1) 1-jan-02       2002        number 2-jan-02       2002        number . . . 1-jan-03       2003 (Y2)     number Z(2) 2-jan-03       2003 (Y2)     number Z(2) . . . until dec 31 2007.   I used the plot3d funtions to build a scatter point plot. Call rinterface.rrun("library(rgl)") Call rinterface.rrun("plot3d(x,y1,z1,xlab='Date',ylab='Year',zlab='Vol',ylim=c(2001,2008))") Call rinterface.rrun("plot3d(x,y2,z2,add=TRUE)") Call rinterface.rrun("plot3d(x,y3,z3,add=TRUE)") Call rinterface.rrun("p...
2002 Mar 07
2
Statconnector and Excel
...ackage. I've installed the R-(D)COM and the R-excel interface by Neuwirth. They seem to work both. However I would like to display the r-generated data in an Excel sheet as an array but I don't manage. Here is an example of my source: Sub doR() Call RInterface.StartRServer Call RInterface.RRun("library(mdnn)") Call RInterface.RRun("F11b1<-read.table(""c:/test/Testb1.txt"", header=TRUE)") Call RInterface.RRun("passTestb1<-pass(Testb1, Threshold=5, ExtremeThreshold=5)") Call RInterface.RRun("passTestb1") Call RInterface.getA...
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"...
2005 Dec 31
1
r: RODBC QUESTION
...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 = odbcConnectExcel('c:/TRY.xls')" RInterface.RRun "q1 = sqlFetch(A, 'Sheet1')" RInterface.RRun "odbcClose (A)" Worksheets("out").Activate Call RInterface.GetArra...
2011 Apr 01
4
Rexcel path problem
...th 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" part of the path as an R command. It does not recognize the "X:\Trading\Energy\JorgeSpace\TMPholder\cpixe\home models\" as a one single string, or path. Any ideas how can I fix the problem? Thanks ,' Jorge VB code Sub tester()...
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 some kind of OLE error. I can't seem to find anything about it online and it's hard to replicate for someone else since you'd have to have my installa...
2008 Mar 20
2
I need help integrating ggplot2 into Excel
...ot2 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 RInterface.RRun("qplot(x=Hours,y=pH,data=ds,facets=Sample~.,geom=""line"",group=Cell)") With no output ... I have tried the following in Worksheet function mode: if Range(H40:I42) contains: " (Embedded image moved to file:...
2009 Jul 27
1
creating and populating an environment
...ple of this would be: Sub VBAMacro() 'fetch some data from an excel sheet 'do some basic stuff on said data 'transfer data from vba to R 'run some R statements 'get data back to vba 'show results on the excel sheet 'clean R by deleting all vars that were created: rrun "rm(a,b,c,....)" end sub This has two obvious disadvantages, as I have to make sure: 1) not to use R variable names which may already exist 2) to remove all variables (garbage collection) In order to overcome these issues I was wondering if I should execute all R statements inside the R...
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 &quot...
2018 Mar 01
0
RExcel issues
...tments.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 command)" > > Recently that macro started blowing up, returning #RErrors, and when I try to trace the error I find that it is some kind of OLE error. I can't seem to find anything about it online and it's hard to replicate for someone else since you'd have to have m...
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)" rinterface.RRun "output=sigma(fit)" Please let me know the erro...
2009 Feb 06
0
RExcel waiting for OLE action
...ctures.Insert statements or the GetArray statements until the user clicks OK on the dialog box. Any insight into how I can avoid the dialog box would be appreciated. The macro is below. It's your basic, send-to-R, run R, retrieve-from-R macro. Call Rinterface.StartRServer Call Rinterface.RRun("rm(list = ls())") Call Rinterface.RRun("dev.off()") Call Rinterface.PutArray("mat1", Range("DATA_INPUT_OUTPUT!B7:I506")) Call Rinterface.PutArray("mat2", Range("DATA_INPUT_OUTPUT!J7:Q506")) Call Rinterface.PutArray("cpd...
2005 May 11
0
RODBC Oracle and VB automation with R(D)COM
...B UID=MYUID PWD=MYPWD DBQ=LT10G DBA=W APA=T EXC=F FEN=T QTO=T FRC=10 FDL=10 LOB=T RST=T GDE=F FRL=F BAM=IfAllSuccessful NUM=NLS DPM=F MTS=T MDI=F CSR=F FWC=F FBS=64000 TLO=0 When I run the same code through VBA (and VB .NET). I would have: Rinterface.RRun("channel<- odbcConnect(dsn='MY_DB', uid='MYUID', pwd='MYPWD', case = 'oracle')") And then to check that there is a connection (since the rest of the code fails I debug by putting the channel variable to a .Rdata file and then inspect the value from the...
2008 Dec 12
8
cucumber features HTML output bug with more than 100 steps
I''m having the following problem: With the format as html, the output of cucumber stops coloring successful steps green after step #100. This last line in the HTML is: <script type="text/javascript">stepPassed(100)</script> Steps 101 -n are colored grey. The <body> tag is not closed but all steps are displayed. When running with ''format
2009 Jan 30
1
run query using rexcel runrfile and rodbc sql query
...the rexcel package. When I run the code from my excel plugin I get an error: "Error -2147220502 in Module RExcel.RServer Error running expression eval(parse(text="source(.rexcel..hzpouai)"))" Here is my excel plugin code: rinterface.StartRServer rinterface.RRun "setwd(""C:/Documents and Settings/bbolt/ Desktop"")" ChDir "C:/Documents and Settings/bbolt/Desktop" rinterface.RunRFile "Script.r" It works fine if Script.r is something simple like: Text <- data.frame(Hello="Hello") But...
2005 May 26
1
Help needed - Use of RSrvr in macro mode
...Selection.End(xlDown)).Select Selection.ClearContents Call RInterface.StartRServer Call RInterface.RunRFile("h:\R-Sources\smalltest.r") Windows("smalltest.xls").Activate CommandString = Range("test!a1") MsgBox (CommandString) Call RInterface.RRun("CommandString") Workbooks.Open Filename:="c:\windows\temp\resultat.csv" Range(Selection, Selection.End(xlToRight)).Select Range(Selection, Selection.End(xlDown)).Select Selection.Copy Windows("smalltest.xls").Activate Range("A3").Sele...
2004 Sep 09
2
Handling the windows clipboard/32KB limit
...up the frame to send into small pieces to be collected and assembled in Excel? Chris P.S. (some details for those who are interested) Here is what I use to go from Excel to R (which in turn uses the RExcel add in to send the R call, but not the data): Range("Alldata").Copy Call RRun("Alldata<-read.table(file=file(description='clipboard'),sep='\t',na.strings=c('#N/A',''),header=TRUE,comment.char=';')") There are two funny things about this: 1. It's very fast. 2. (this may be bug or feature depending on view point): Range...
2011 Sep 09
0
RExcel - RunRFile Errors
...erts = False Rinterface.StartRServer Rinterface.RunRFile "S:/Folder/FileName.R" 'RInterface.StopRServer Application.DisplayAlerts = True End Sub But it returns the error "Error when sourcing R file S:/Folder/FileName.R" I have also tried a simple RInterface.RRun("source(""S:/Folder/FileName.R"")") But it did not work. Can anyone help me in writing this macro? Thanks in advance. -- View this message in context: http://r.789695.n4.nabble.com/RExcel-RunRFile-Errors-tp3800748p3800748.html Sent from the R help mailing list arch...
2010 Oct 30
1
R & VBA
...a = Range("A1:A10") Set RngData2 = Range("B1") Elements = 100 ReDim DblArray(0 To Elements - 1) For i = 0 To Elements - 1 DblArray(i) = Rnd() Next i Start = Timer Call RInterface.StartRServer Call RInterface.PutArray("test", RngData) Call RInterface.RRun("z<-median(test)") Call RInterface.GetArray("z", RngData2) Call RInterface.StopRServer 'Range("B1") = RngData2 Length = Length + Timer - Start Debug.Print Length End Sub [[alternative HTML version deleted]]
2008 Jun 05
1
R-code embedded in VBE -- Type mismatch errors
...io(ID_Col) = Worksheets("Projection").Cells(Start_Row, Start_Col + ID_Col - 1).Value Use(ID_Col) = Worksheets("Projection").Cells(Start_Row + 1, Start_Col + ID_Col - 1).Value Next ID_Col Call rinterface.PutArrayFromVBA("link_ratio", Link_Ratio) Call rinterface.RRun("fitted_lr <- link_fit_vec(link_ratio)") Fitted_LR = rinterface.GetArrayToVBA("fitted_lr") ---------------------------- END OF VB code ------------------------------------------- At this point the code execution stops, signalling the type mismatch error. The related R c...