search for: readworksheet

Displaying 20 results from an estimated 28 matches for "readworksheet".

2013 Nov 04
3
Reading data from Excel file in r
Hi experts, I want to read data from an excel data like this: for the fifth column, from first row until 140 but only 1,3,5,7,.....139 (only 70 values), How can I do it in R? thanks [[alternative HTML version deleted]]
2017 Aug 30
2
Converting character to numeric using the package "XLConnect"
...ork. When I write data to worksheets in an Excel file, some numbers in the cells are stored as text (instead of numeric). Here is my code (the Excel file is attached): rm(list=ls(all=TRUE)) library(XLConnect) tab <- loadWorkbook("C:/Users/Downloads/File.xlsx", create = TRUE) set <- readWorksheet(tab, sheet = "settings") setNum <- readWorksheet(tab, sheet = "settings", colTypes="numeric") index <- which((!is.na(setNum)), arr.ind=TRUE) if(length(index)!=0){ set[index] <- unlist(lapply(set[index], function(x) as.numeric(as.character(x)))) } ## to check...
2017 Aug 30
0
Converting character to numeric using the package "XLConnect"
...ubs potentially malicious files (including zip, csv, or xls files). You could send a "csv" file with extension of ".txt". > > rm(list=ls(all=TRUE)) > library(XLConnect) > tab <- loadWorkbook("C:/Users/Downloads/File.xlsx", create = TRUE) > set <- readWorksheet(tab, sheet = "settings") > setNum <- readWorksheet(tab, sheet = "settings", colTypes="numeric") Presumably you could also send the results of dput(setNum) .. either as a .txt attachment or embedded in an email. > index <- which((!is.na(setNum)), arr.in...
2012 Oct 15
2
Download a file from url
...ls> I tried this --------------------------------------------------------------- library(XLConnect) url = "http://www.nseindia.com/content/fo/fii_stats_12-Oct-2012.xls" local.xls.file = tempfile() download.file(url, local.xls.file) wb = loadWorkbook(local.xls.file, create=F) data = readWorksheet(wb, sheet=1) View(data) --------------------------------------------------------------- no results ... kindly help me thanks veepsirtt -- View this message in context: http://r.789695.n4.nabble.com/Download-a-file-from-url-tp4642985p4646215.html Sent from the R help mailing list archive at Nabb...
2017 Aug 30
3
Converting character to numeric using the package "XLConnect"
...crubs potentially malicious files (including zip, csv, or xls files). You could send a "csv" file with extension of ".txt". > > rm(list=ls(all=TRUE)) > library(XLConnect) > tab <- loadWorkbook("C:/Users/Downloads/File.xlsx", create = TRUE) > set <- readWorksheet(tab, sheet = "settings") > setNum <- readWorksheet(tab, sheet = "settings", colTypes="numeric") Presumably you could also send the results of dput(setNum) .. either as a .txt attachment or embedded in an email. > index <- which((!is.na(setNum)), arr.ind...
2011 Feb 24
0
Rd, S4 classes and PDFs
...n extra line and b) allows line breaks in the argument list Typographic issues aside, I like that R CMD check will actually make sure that all the parameters are documented etc. However, there are still some overflows for methods with many parameters, my worst offender currently being \S4method{readWorksheet}{workbook,numeric,numeric,numeric,numeric,numeric,logical}(object,sheet,startRow,startCol,endRow,endCol,header) where just the type signature alone is too long. I tried various ways of introducing line breaks in the type signature, but they all seem to fail (\cr, \, raw line breaks, double raw lin...
2013 Nov 19
1
XLConnect error - "not implemented yet"
When using XLConnect's readWorksheet, instead of it correctly reading string and numeric columns, I receive NA's with the following message: " Error when trying to evaluate cell A2 - not implemented yet" I do not know what this means. Can anyone please assist? -- __________________________ *Barry E. King, Ph.D.* Chi...
2012 Dec 22
1
Character Variable in X axis scatter plot
I am very new to R statistics. Have installed R-2.15.2 ; Rcmdr 1.9-2 ; RStudio 0.97.237 on Debian Squeeze and also windows7 I can Import from Excel File OK .Workbook <- loadWorkbook("/media/4C90-B739/Oct13-Dec21Bsl.xls") JJData <- readWorksheet(.Workbook, "Oct13-Dec21Bsl") remove(.Workbook) have a data frame with following. DATEEVENT AdjDateTime TIMESLOT EVENTTYPE KEY0 BSLmmol/L 41195.3027777778 13/10/2012 7:16 1 1 278 15.44 41195.4909722222 13/10/2...
2014 Aug 14
3
leer ficheros excel en R en Ubuntu
...= read.xls (xlsfile, sheet = 1, header = TRUE) df = read.xls ("madrid.xls", sheet = 1, header = TRUE) df = read.xls ("madrid.xls") require(xlsx) read.xlsx("madrid.xls", sheetName = "Sheet1") library(XLConnect) wk = loadWorkbook("madrid.xls") df = readWorksheet(wk, sheet="Sheet1") -- también he probado directamente read.table ya que el fichero es tipo xml por dentro: df = read.table("madrid.xls", header = TRUE) -- ejemplo del fichero: $ head -c 500 madrid.xls <table border="1"><tr><th bgcolor="#FFB18C&...
2013 Jul 16
2
Importing data by odbcConnectExcel in 64 bit
I have probably an old question. I have R.3.0.1 installed in 64 bit windows 7. The odbcConnectExcel in RODBC library does not work. Tried odbcConnectExcel2007 still does not work. Any ideas. Thanks Melissa<-sqlFetch(odbcConnectExcel2007("F:\\Cotton2012\\validation.xlsx"),sqtable = "Sheet3", + na.strings = "NA", as.is = TRUE) Error in
2015 Sep 17
2
Fwd: Creación fichero excel con loadWorkbook
> > > Hola chic en s, > > sigo intentando crear un archivo de Excel pero no hay manera. Sigo los pasos del documento de ayuda siguiente: > > http://altons.github.io/r/2015/02/13/quick-intro-to-xlconnect/#load > > los pasos que hago son: > > install.packages("XLConnect") > require(XLConnect) > wb <-
2014 Aug 15
5
leer ficheros excel en R en Ubuntu
...adrid.xls", sheet = 1, header = TRUE) >> df = read.xls ("madrid.xls") >> >> require(xlsx) >> read.xlsx("madrid.xls", sheetName = "Sheet1") >> >> library(XLConnect) >> wk = loadWorkbook("madrid.xls") >> df = readWorksheet(wk, sheet="Sheet1") >> >> -- >> >> también he probado directamente read.table ya que el fichero es tipo xml >> por dentro: >> df = read.table("madrid.xls", header = TRUE) >> >> >> -- ejemplo del fichero: >> $ head -c 50...
2015 Mar 26
2
Conectividad con Excel
Hola amigos, buenos días Esto sigue avanzando. Estoy ahora tratando de establecer la conectividad de R con Excel y he seguido dos viídeos en YouTube de una profesora llamada Bebilda que se explica muy bien. Con ambos tengo el mismo problema así que planteo uno de ellos, éste es: https://youtu.be/_pSJQO_9I4k?list=PL7DA3FDA21A1A6310 Pero os lo explico brevemente: Cargo el paquete RODBC >
2013 Apr 24
0
time from excel with XLConnect
When I read a time hh:mm:ss from a excel sheet with gdata read.xls it is as expected. When I read the time with readWorksheet I get 1899-12-31 00:20:00 UTC. I would prefer XLConnect because it does not nee perl installed but the data coming with XLConnect is not usable.
2013 Nov 22
1
Appending Excel File Data in different folders into Single Dataframe
Hi all I have about 10 folders in my directory i.e Folder 1 – Folder 10. Each Folder has a single excel file containing data with the following attributes “State”,”lat”,”lon”, “address” i.e State Lat Lon Address Anchorage 45.87576 -12.567 Starbucks, Van dyke road, 33456, USA I would like to write a script in R that
2012 Jun 26
1
compare one field of dataframe with excel sheet using R
I have a data frame consisting of three columns(name of compund,ppm and frequency).Name contains string values .ppm and frequency contains numeric values with decimal points upto four digits. I have an excel sheet which is like a library.The first column contains the name of compounds and remaining column contains the ppm values of the compound which satisfy certain rules.The number of ppm values
2013 Apr 23
1
Questions on function "readNamedRegionFromFile" in XLConnect pacakge
Hi, I have two questions on the function "readNamedRegionFromFile" in XLConnect pacakge. 1. In the documentation, # multiregion xlsx file from demoFiles subfolder of package XLConnect demoExcelFile <- system.file("demoFiles/multiregion.xlsx", package = "XLConnect") # Load a single named region into a single data.frame. df
2014 Aug 15
2
leer ficheros excel en R en Ubuntu
...read.xls ("madrid.xls") >>>> >>>> require(xlsx) >>>> read.xlsx("madrid.xls", sheetName = "Sheet1") >>>> >>>> library(XLConnect) >>>> wk = loadWorkbook("madrid.xls") >>>> df = readWorksheet(wk, sheet="Sheet1") >>>> >>>> -- >>>> >>>> también he probado directamente read.table ya que el fichero es tipo xml >>>> por dentro: >>>> df = read.table("madrid.xls", header = TRUE) >>>> >&gt...
2012 Mar 15
2
Importing multiple worksheets from one Excle/ csv file into R
Dear R experts, I am trying to import some data from some Excle files into R. My Excle file contains about 50 sheets. One solution I can think about is to convert my Excle file into csv file first and then load data into R using 'read.csv'. But it seems to me that 'read.csv' only supports reading one sheet (or 'one file') each time, so that seems I have to create 50 csv
2011 Sep 15
2
Reading Parts of Excel Files (within a sheet)
Dear R Users, I have to read data from many excel spreadsheets, all which have some frustrating formatting (lots of titles, headers, etc.). I am trying to work directly from source data and the number of the spreadsheets I would have to go through make reformatting one by one a pain. I have found lots of ways to read excel files, but my question is whether there is a way to only read