similar to: solution for reading access tables into R

Displaying 20 results from an estimated 5000 matches similar to: "solution for reading access tables into R"

2009 Nov 18
3
Re ading multiple Excel 2007 files with a loop
I have several hundred Excel 2007 data files in a folder. I would like to read every file in a single given folder using a loop. I have searched the FAQ, the forum archives here, other or older R boards and the R Import / Export documentation, and have asked some very knowledgeable R users without learning of a solution. I hope someone here can help. I understand that the most common
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!
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
2003 Jul 09
2
RODBC and Oracle: error "table does not exist"
Dear r-helpers! I have trouble reading data from an Oracle data base using RODBC Version 1.0-3, R Version 1.7.1, Windows XP, Oracle8 ODBC Driver Version 8.1.6.4.0: > library(RODBC) > channel <- odbcConnect(dsn="PAV32", case="oracle", believeNRows=FALSE) > # ok, this was succesful > x <- sqlTables(channel) > x[37, ] TABLE_CAT TABLE_SCHEM TABLE_NAME
2014 Jun 30
1
Getting data from Table in RStudio
Hello, I am new to R progaming and have just started using this program since last week. What i want to achieve is to use R to determine patterns in sales/ customer complaint etc. information located in a mysql database. I am not sure how to approach this or which technique i should use to do so. However, i had proceeded to add a dataset to RStudio using the following code: library(RODBC) 
2011 Jan 23
3
Problem reading PostgreSQL data with RODBC
Dear list - I am having a problem using RODBC to access records from tables in a PostgreSQL database. There is no problem establishing the connection using chnl <- odbcConnect (dsn= ... etc. The DSN seems to be properly set up using the PostgreSQL Unicode ODBC driver, and sqlTables(chnl) works OK and produces a list of tables in the database (they are all in a schema called 'source').
2005 Aug 31
0
Reading numeric data in Excel as character data in R using RODBC
The Excel 'database' I am pulling from mixes multiple character indicators for different kinds of non-numeric results in the same column as the numeric values. A simple sqlFetch turns all of the character indicators into NAs. I would like to pull in all of the Excel data as character so that I can split the column into multiple types of vectors and control the type conversion within R. Can
2012 Jul 04
1
RODBC tables
Dear Sir/Madam, I am desperately in need of some help. I am trying to access tables from the oracle database and inserting them into R via a data frame and I keep getting an error saying that "Error in .Call(C_RODBCFetchRows, attr(channel, "handle_ptr"), max, buffsize, : negative length vectors are not allowed". My connection is fine and my code for this is:
2007 Jul 17
4
[R-sig-DB] RODBC on Oracle DB
essai <- odbcConnect("ORESTE_prod", uid="osis_r", pwd="12miss15" ,case="oracle") > sqlTables(essai)$ORESTE ... 1315 <NA> ORESTE S_PROFESSIONS_OLD TABLE <NA> 1316 <NA> ORESTE S_PROVENANCES TABLE <NA> 1317 <NA> ORESTE
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
2009 Oct 28
1
replacing <NA> in character column
I have a small Excel data file with two columns of character variables, one column with a numeric variable and three rows. One of the character cells is blank and one of the numeric cells is blank. I read the data file with the following code: library(RODBC) channel <- odbcConnectExcel('u:/test.xls') sqlTables(channel) s1 <- sqlFetch(channel, "Sheet1")
2008 Oct 24
1
Rgui.exe - Application Error
Hello All, I get the following error when i run the following script in Rgui Rgui.exe - Application Error The instruction at "0x7c9109f9" referenced memory at "0xffffffff". The memory could not be "read" Click on OK to terminate the program The script is library(RODBC) channel <- odbcConnect("curve", uid="curve", pwd="curve")
2009 Jan 26
2
R crashes when using the RODBC Package
Hi, I've written some code that fetches data from an Access Database (2003), processes the data, then saves the modified data back into a table in the Access database. It works if I only pass through the code once, but if I put a loop around the code so that I fetch data from a different source table, and then save it again to a different destination table, the code crashes. It is
2009 May 28
4
Read & name multiple excel sheets using RODBC
I'd like to be able to read multiple sheets from an excel workbook and use the sheet name to name the resulting dataframe using RODBC. at the moment i've figured out how to do it the long way (see below) but feel sure that there is a speedier & possibly automatic way to do it in R. i've tried to run a loop using sqlTables but it seemed to break the connection. unless i've
2014 Jun 30
2
Change database in SQL Server using RODBC
I wish to query tables that are NOT in the default SQL Server 2012 database. At work I am using SQL Server 2012 and Windows 7. I tested the following on my home set up of Server 2012 and Windows 7. I am using RStudio. I wish to connect to several SQL Server 2012 databases from R. This page helped me get started. http://andersspur.wordpress.com/2013/11/26/connect-r-to-sql-server-2012-and-14/
2004 Nov 11
2
RODBC & POSIX & Daylight Saving blues
Dear All, The recent improvement in RODBC to recognize datetimes in tables has exposed my ongoing confusion. All my data are obtained from a satellite system (Argos) which tags events in the GMT time zone. Daylight saving is ignored. To my way of thinking this means that 1. twelve-o-clock means halfway through the day regardless of season, and 2. the difftime of any two dates where
2007 May 31
2
Import data from Access
Hi, I want to import some data from Access and I am using the following codes: testdb <- file.path("c/../db1") channel <- odbcConnect("testdb") sqlFetch(channel,"tbl",colnames = TRUE, rownames = FALSE) It comes out the error message: 1: [RODBC] ERROR: state IM002, code 0, message [Microsoft][ODBC Driver Manager] Data source name not found and no default
2012 Feb 16
1
Reading Text Files with RODBC
I'm thoroughly stumped. I've been playing with RODBC and wanted to see if I could retrieve data from text files using this package as well (for the most part, this is an intellectual exercise, but occasionally I do get data files large enough in CSV format RODBC could be helpful) . I set up a DNS called "Text Files" and then ran the following code in R > library(RODBC)
2008 Feb 05
1
SAS ODBC
All, I'm trying to connect to a remote SAS server using SAS's 9.1 ODBC driver and the RODBC package. I'm running R-2.6.1 on Win XP. I can successfully connect to the database, but no matter which table I query, I get back an empty table with only the column headers. For example: > sqlQuery(con, "select * from PRICES.DB_PRICES") [1] COMMOD_CURVE START_DATE
2012 Nov 26
2
puzzling RODBC error
Dear all, I'm trying to connect to an MSAccess database (ArcGIS personal geodatabase). I keep getting an error about the channel when using sqlQuery(). However, sqlTables() does not complain about the channel and lists all tables in the database. If I try sqlFetch(), then R crashes. I'm happy to hear suggestions on how to solve this. Best regards, Thierry > MDB <-