Displaying 20 results from an estimated 10000 matches similar to: "reading multiple files"
2005 Jun 07
2
reading non-existing files
Dear all,
I'm trying to read to a collection of files in a loop
using odbcConnectExcel - but not all of the files
exist. This is the code I have
for(i in 1:no.of.subs){
channel <- odbcConnectExcel(paste(working.dir,
subs[i], ".xls", sep=""))
datafiles[[i]] <- as.matrix(sqlFetch(channel,
"Data"))
close(channel)
}
I'm not sure how to
2010 Feb 23
1
RODBC to import/export xls files
Dear R users,
I've learned today about RODBC package in order to import xls file to
dataframes and export the dataframes to xls files.
However I have some problems. Please excuse me if these are basic but as
I said, I've just begun with this package.
Also this email is quite long, but everything is related, so I don't
think it would be better to split it. Moreover, there's a
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
2003 Mar 13
2
RODBC and Excel in Widows
Hello, I have some problems with RODBC and Excel in Win98
I am using R 1.6.2 and just upgraded RODBC to the last version on CRAN.
I have an Excel file with columns Number, Name, Sex, Age, FEV1 on Sheet
1 and Number, Age, FEV1, Name, Sex on Sheet 2.
Now I open the channel to the file
> chan1 <- odbcConnectExcel("c:/testOdbc.xls")
> tables(chan1)
and the list appears with the 2
2012 May 19
2
Loading the stupid dataset--help!!!
I am using the following:
library(RODBC)
chan = odbcConnectExcel("rats-lda")
rats.lda = sqlFetch(chan, "data")
close(chan)
And getting the following error message:
> library(RODBC)
Error in library(RODBC) : there is no package called ?RODBC?
> chan = odbcConnectExcel("rats-lda")
Error: could not find function "odbcConnectExcel"
> rats.lda =
2010 Jul 22
1
64 bit use of odbcConnectExcel
Hi All,
I'm using R 2.11.1 on 64 bit windows XP. The little function I wrote below
I use often to import the first 1001 lines in an excel sheet to R. This
works fine on the 32 bit version of R but fails on the 64 bit [both on the
same machine, using the same function, importing the same .xls file]. The
message from 64 bit R is:
Error in sqlTables(channel1) :
first argument is not an
2014 Aug 15
5
leer ficheros excel en R en Ubuntu
Hola,
@javier, me gustaría no tener que hacer nada de forma manual, ni por fuera
de r, rstudio. Es decir, el típico comando de linux que me convierta de xls
a csv prefiero no usarlo. Me gustaría hacerlo todo desde R.
@jorge ->
Con RODBC me salta ->
Error: could not find function "odbcConnectExcel"
Lo que creo que es inevitable en Ubuntu
2014 Aug 14
3
leer ficheros excel en R en Ubuntu
Hola,
Pensé que esto iba a ser trivial en R, pero me estoy encontrado muchos con
mi problema en internet, y que las soluciones ofrecidas no terminan de
funcionar.
Estoy intentando leer un fichero .xls en ubuntu con los siguientes paquetes
y nada:
require(RODBC)
conn = odbcConnectExcel("madrid.xls") # open a connection to the Excel file
sqlTables(conn)$TABLE_NAME # show all sheets
df =
2004 Nov 09
1
colnames argument in sqlFetch backwards? (PR#7355)
Full_Name: Bert Gunter
Version: 2.0.0 patched
OS: Win2000
Submission from: (NULL) (192.12.78.250)
The TRUE/FALSE options of the colnames argument in sqlFetch (RODBC) seem to be
reversed, at least for .xls files.
## z is a connection to an xls workbook opened by odbcConnectExcel()
> dat<-sqlFetch(z,'SuccessRates',colnames=FALSE)
> dat[1:5,]
RecID Name Run Grams Lost Run
2014 Aug 15
2
leer ficheros excel en R en Ubuntu
Gracias Jorge por contestar tan rápido.
Con gdata hago eso del path, y directamente con el fichero, lo vi en una
web, y he intentado todas las opcioens que he visto.
En vez de install.packages('rJava', type = 'source')
he hecho install.packages('rJava')
Ahora probaré, y lo mismo con scan y readLines.
He visto en stackoverflow que mi problema puede ser actualizar java,
2011 Apr 27
1
Reading file
Hi all,
I am trying to read Excel file usingthe follwoing commnad
library(RODBC)
data=odbcConnectExcel(file.choose())
sqlTables(data)
Bdat=sqlFetch(data, "test")
odbcClose(data)
head(Bdat)
1. The above script works if the Excel file is opened. If the excel file is
not opened then I get the following message "External table is not in the
expected
2007 Mar 06
2
Package RODBC
I have some questions about the RODBC package.
library(RODBC) # required for those who want to repeat these lines
1st, I noticed that the following sequence does not work:
channel <- odbcConnextExcel("test.xls")
tables <- sqlTables(channel)
name1 <- tables[1, "TABLE_NAME"] # this should be the name
plan1 <- sqlFetch(channel, name1) # bang!
2005 Apr 26
2
writing a data frame in excel format
Hello
I know how read a file in excel format into a R data frame using the
RODBC library, but I don't know how write a R data frame in excel
format. I don't understand the instructions from RODBC user manual.
To read an excel file I use.
library(RODBC);
conex<-odbcConnectExcel("fis_quim.xls");
sqlTables(conex);
data<-sqlFetch(conex,"hoja1");
Suppose I
2005 Nov 02
2
RODBC and Excel: Wrong Data Type Assumed on Import
The first column in my Excel sheet has mostly numbers but I need to treat it
as character data:
> library(RODBC)
> channel <- odbcConnectExcel("U:/efg/lab/R/Plasmid/construct list.xls")
> plasmid <- sqlFetch(channel,"Sheet1", as.is=TRUE)
> odbcClose(channel)
> names(plasmid)
[1] "Plasmid Number" "Plasmid"
2011 Feb 10
2
Rioja package, creating transfer function, WA, "Error in FUN"
Hi, I am a new R user and am trying to construct a palaeoenvironmental
transfer function (weighted averaging method) using the package rioja.
I've managed to insert the two matrices (the species abundance and the
environmental data) and have assigned them to the y and x values
respectively. When I try and enter the 'WA' function though, I get an 'Error
in FUN' message (see
2014 Aug 15
2
leer ficheros excel en R en Ubuntu
offline? te lo envío a tu email, pq no creo que a toda la lista sea buena
idea.
El 15 de agosto de 2014, 9:47, Jorge I Velez <jorgeivanvelez en gmail.com>
escribió:
> De nada, Miguel. Es posible que me envies el archivo offline? --JIV
>
>
>
> 2014-08-15 17:45 GMT+10:00 Miguel Fiandor Gutiérrez <
> miguel.fiandor.gutierrez en gmail.com>:
>
> Gracias
2009 Apr 07
4
Re ading Excel 5.0 files with RODBC?
Hi,
i'm trying to read some data from excel files but it seems that neither
xlsReadWrite nor sqlFetch (RODBC) doesn't like the format (Excel 5.0).
When i open the file in Excel and save it in a new format Excel 97 -2003
everything works fine.
Is it possible to use ODBC connection to open old format files, or i guess i
will have to open and save every file in Excel in new format, which
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 =
2012 Aug 01
1
Why the error is coming while extracting the data from sheet?
Even though the sheet name Publication exists. The error is coming.
Can anyone help?
library("RODBC")
cdb_cnct <- odbcConnectExcel("Copy of AZIF_DC_GVK_NSCLC_MSALL_287papers_02072012_141450_v1_4.xls")
cdb_frame <- sqlFetch(cdb_cnct, "Publication")
odbcClose(cdb_cnct)
Error in odbcTableExists(channel, sqtable) :
'Publication': table not found on
2009 Nov 16
3
Error on reading an excel file
Hello everybody, here is the code I use to read an excel file containing two
rows, one of date, the other of prices:
library(RODBC)
z <- odbcConnectExcel("SPX_HistoricalData.xls")
datas <- sqlFetch(z,"Sheet1")
close(z)
It works pretty well but the only thing is that the datas stop at row 7530
and I don?t know why datas is a data frame that contains 7531 rows with the