search for: comcreate

Displaying 20 results from an estimated 37 matches for "comcreate".

2009 Jul 08
1
RDCOMClient: how to close Excel process?
...RDCOMClient (http://www.omegahat.org/RDCOMClient/) to retrieve data from MS Excel workbook. I?m using the code below to count the number of sheets in the workbook and then loop the data from sheets in to a list. ############# R code ################### library(gdata) library(RDCOMClient) xl <- COMCreate("Excel.Application") sh <- xl$Workbooks()$Open(normalizePath("sample_file.xls"))$Sheets()$Count() DF.list <- list() for (i in 1:sh) { DF.list[[i]] <- read.xls("sample_file.xls", sheet=i, stringsAsFactors = FALSE) } ######################################...
2009 Jul 09
1
R-help Digest, Vol 77, Issue 9
...RDCOMClient (http://www.omegahat.org/RDCOMClient/) to retrieve data from MS Excel workbook. I?m using the code below to count the number of sheets in the workbook and then loop the data from sheets in to a list. ############# R code ################### library(gdata) library(RDCOMClient) xl <- COMCreate("Excel.Application") sh <- xl$Workbooks()$Open(normalizePath("sample_file.xls"))$Sheets()$Count() DF.list <- list() for (i in 1:sh) { DF.list[[i]] <- read.xls("sample_file.xls", sheet=i, stringsAsFactors = FALSE) } ######################################...
2004 Nov 30
1
Using mimR
Hi, I am trying to use the mimR Package. According to its help pages it needs the RDCOMClient package to run. When I try to evaluate a model I get > m.sat<-mim("..",data=gm.dat) Error in mim.cmd("clear; clear output") : couldn't find function "COMCreate" > m2.sat<-emfit(m.sat) Error in toMIM(mim$data) : Object "m.sat" not found > imputeMissing() Error in mim.cmd("impute") : couldn't find function "COMCreate" > imp.dat<-retrieveData() Error in mim.cmd("pf 12,8", look.nice = FALSE) :...
2005 Apr 04
1
RDCOMServer for R 2.0.1 + Windows ?
...nd made a small change to the registerClassID function ( to make it use the right path to RDCOMServer.dll). Then I tried to replicate the simple TTest example from the same web site. The COM class definition and registration worked fine for me. To test this, I tried to create the COM object using COMCreate ( from the RDCOMClient package ): COMCreate('R.TTest') -- this causes an error saying "Error in the DLL". In other words it is able to get the DLL path correctly via the Win registry, but is then having a problem with the DLL. If anyone has a working Windows build for R2.0.1, pl...
2003 Jun 13
1
RDCOM Client: processes not terminating
...n omegahat.org) under R 1.7.0 and Windows XP Pro. Is this the right forum for questions about this package? In case it is, here is my question: Instances of COM objects do not seem to terminate as expected, but leave residual processes running. For example, if I try the simple example: E <- COMCreate("Excel.Application") E[["Visible"]] <- TRUE E$Quit() An Excel application is created and pops up visibly. The E$Quit() command appears to close the application down as expected, but an EXCEL process is still left running in the background (as indicated by e.g. the Windows Ta...
2012 Mar 31
3
clear console
hi, I use R - 2.15(32bit), and want to make a code to clear a console. Actually, I used to run following code to do that but after update the version of R from 2.14 to 2.15, it doesn't work. cls <- function (t) { require(RDCOMClient) wsh <- COMCreate("Wscript.Shell") wsh$SendKeys("\f") invisible(wsh) } cls() or cls <- function() { require(rcom) wsh <-comCreateObject("Wscript.Shell") comInvoke(wsh, "SendKeys", "\f") invisible(wsh) } cls() Can anybody help me to s...
2010 Jul 31
1
How to connect R with SAP
Hello, Anyone knows if there is a way to connect R with the ERP SAP? Thanks. -- View this message in context: http://r.789695.n4.nabble.com/How-to-connect-R-with-SAP-tp2309018p2309018.html Sent from the R help mailing list archive at Nabble.com.
2009 Jan 26
2
RCurl unable to download a particular web page -- what is so special about this web page?
...ce RCurl package. While i can download the webpage using the RDCOMClient, i would like to understand why it doesn't work as above please? > library(RDCOMClient) > my.url <- "http://www.nytimes.com/2009/01/07/technology/business-computing/07program.html?_r=2" > ie <- COMCreate("InternetExplorer.Application") > txt <- list() > ie$Navigate(my.url) NULL > while(ie[["Busy"]]) Sys.sleep(1) > txt[[my.url]] <- ie[["document"]][["body"]][["innerText"]] > txt $`http://www.nytimes.com/2009/01/07/technology/busi...
2006 Apr 19
1
Help with package RDCOMClient
...39;help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > ls() character(0) > > library(RDCOMClient) > data(quakes) > source("K:/R/RDCOMClient/examples/excelutils.R") > xls <- COMCreate("Excel.Application") > xls[["Visible"]] <- TRUE Crashes R! Any ideas? Thank you This message and any attachments are confidential. If you a...{{dropped}}
2009 Jun 27
1
Creating Excel-Charts via RDCOMClient
Hi R-users! I'm trying to create an easy Excel chart using the package RDCOMClient. The following example is working fine: #------------------------------------------------------------------- library(RDCOMClient) xlLocationAsObject <-2 xlXYScatterSmoothNoMarkers <- 73 ex <- COMCreate("Excel.Application") wb <- ex[["Workbooks"]]$Add() sh <- ex$ActiveSheet() ex[["Visible"]] <- TRUE r <- sh$Range("A1:D1") r[["Value"]] <- c(1:4) ch <- ex$Charts() ch$Add() ac <- ex$ActiveChart() ac[["ChartType"]] <...
2003 Jul 29
5
Sending emails from R under Windows
Hi Does anyone know of any R routines to send emails from R, under Windows? I thought about writing such a facility using the R(D)COM package to drive e.g. MS Outlook, but I don't want to reinvent the wheel. I have found a function Sys.mail in the library syskern, but this only works under Unix by shelling out a mail command. Thanks, David
2003 Jul 29
5
Sending emails from R under Windows
Hi Does anyone know of any R routines to send emails from R, under Windows? I thought about writing such a facility using the R(D)COM package to drive e.g. MS Outlook, but I don't want to reinvent the wheel. I have found a function Sys.mail in the library syskern, but this only works under Unix by shelling out a mail command. Thanks, David
2008 Oct 06
3
Extracting text from html code using the RCurl package.
Dear R-help, I want to download the text from a web page, however what i end up with is the html code. Is there some option that i am missing in the RCurl package? Or is there another way to achieve this? This is the code i am using: > library(RCurl) > my.url <- 'https://stat.ethz.ch/mailman/listinfo/r-help' > html.file <- getURI(my.url, ssl.verifyhost = FALSE,
2005 Mar 31
0
Bloomberg data import SOLVED
Together with Enrique's running start and Prasad's work, we figured out how to get tick data and bulk data from Bloomberg into R. Here is a code snippet which builds on Enrique's. ---------------------------- require("RDCOMClient") blCon <<- try(blCon <- COMCreate("Bloomberg.Data.1"), silent=TRUE) # Always check the class of blCon before proceeding! # First tick data ticker <- "IBM US Equity" fields <- c("Last Price","Volume") comFrom <- new("COMDate",38442.4583333333) comTo <- new("COMDat...
2010 Jan 27
1
How to attach chart to excel file?
Hi, How can I attach chart/plot to a excel file? I would like to create a plot in R eg. plot(1) and save it into a Excel file, eg. test.xls in a same working directory. Regrads, -J
2009 Feb 27
1
Problem with RBloomberg (not the usual one)
Hello, everyone! I have a problem with RBloomberg and this is not the usual "no administrator rights" problem. I have R 2.7.2, RBloomberg 0.1-10, RDCOMclient 0.92-0 RDCOMClient, chron, zoo, stats: these packages load OK. Then, trying to connect, I get following error message: conn <- blpConnect(show.days="week", na.action="previous.days",
2010 Mar 23
0
rdcomclient issue - member not found when using borders
...inside a for loop the loop fails after the first iteration, once it reaches the error. Has anyone had experience with this error? Here is the code that is causing the problem. library(RDCOMClient) source("http://www.omegahat.org/RDCOMClient/examples/excelUtils3.R") xls <- COMCreate("Excel.Application") xls[["Visible"]] <- TRUE wb = xls[["Workbooks"]]$Add(1) sh = wb[["Worksheets"]]$Add() sh[["Name"]] <- as.character(tabName) AnalyzeExport <- function(sh,Data,Cell,Title1,Title2) { letters<-c(&quot...
2010 Aug 13
1
RDCOMClient interface - problems setting a variable
I try to produce and modify shapes in a PowerPoint presentation but run into a difficulty setting a variable. library(RDCOMClient) # load RDCOMClient package library(SWinTypeLibs) # package SWinTypeLibs from Omegahat to access information about COM libraries ppt = COMCreate("PowerPoint.Application") # create a ppt COM ppt[["Visible"]] <- TRUE # set COM property visible to TRUE pres = ppt$Presentations()$Add() # add a presentation slide <- pres$Slides()$Add(1,1) # add slide to presentation shape1 <- slide$Shapes()$AddShape...
2009 Jul 02
2
read.xls: number of sheets
Hi, I'm trying to read several Excel sheets from an Excel file into a list. I'm using read.xls from package 'gdata'. I would like to know how I can check the number of sheets before the loop (in the example below) so that I could adjust the loop counter? Any suggestions? DF.list <- list() for (i in 1:4) { DF.list[[i]] <- read.xls("sample_file.xls", sheet=i,
2012 Dec 06
3
Colors according to value (Excel-Export)
Hello together, i have a list of numbers, like this one A B C 1.1 1.2 1.3 i export this list into an excel file and want now color these numbers according to her value. I want every color under 1,25 is red, and every color over 1,25 is green. How can i do this with "RDCOMClient" ? I know how to colour a complete row, like this task: U3R <- sh$Range(zellen_blue) U3RF <-