search for: sample_file

Displaying 4 results from an estimated 4 matches for "sample_file".

2009 Jul 08
1
RDCOMClient: how to close Excel process?
.... 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) } ###################################### COMCreate opens Excel process and it can be seen from Windows Task Manager. When I try to...
2009 Jul 09
1
R-help Digest, Vol 77, Issue 9
.... 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) } ###################################### COMCreate opens Excel process and it can be seen from Windows Task Manager. When I try to...
2009 Jul 02
2
read.xls: number of sheets
...e 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, stringsAsFactors = FALSE) } Thanks, -L
2009 Jul 09
2
How to Populate List
.... 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)    } ###################################### COMCreate opens Excel process and it can be seen from Windows Task Manager. When I try to...