Displaying 20 results from an estimated 1000 matches similar to: "sqlSave() and rownames=TRUE makes my Rgui crash"
2003 Apr 04
2
sqlSave() Question
All,
I am new in R. I found sqlSave() doesn't work for our Oracle9i. The
following was the message:
> sqlSave(channel, USArrests, rownames="state")
Error in sqlColumns(channel, tablename) : USArrests : table not found on
channel
Check case parameter in odbcConnect
>
sqlQuery() works OK.
Please help. Thanks.
-MY
2003 Apr 02
1
RODBC sqlSave problem.
Dear list,
Being new to both the postgres database, ODBC and the RODBC interface, I
am somewhat confused by some of the problems I am experiencing trying to
connect R to the database.
Whai I am trying is basically the example part of the help file for the
sqlSave function:
> library(RODBC)
> odbcConnect("theodor") -> channel
> data(USArrests)
> sqlSave(channel,
2001 Aug 31
1
RODBC SQLSave
I am having the following problem with RODBC
I connect to an oracle 8i (8.1.7) database using RODBC as follows;
dbConn <-
odbcConnect("mydatabase","myuserid","mypassword",case="oracle")
Then I extract some data, actually a whole table;
orgdata <- sqlQuery(dbConn, "select * from organism", na.strings = "NA")
Then I try to save it
2010 Feb 24
1
problem with sqlSave()
Dear R users,
I've already asked this question yesterday, but, though I had answer for
the other ones (and they helped a lot, thanks), for some reason didn't
get an answer for this one (I would also appreciate to know why, so that
I can improve the quality and clarity of my future questions).
Here it is again:
I'm trying to use RODBC to export dataframes to xls files.
When I run
2009 Oct 16
2
RODBC sqlSave does not append the records to a DB2 table
I am running R version 2.9.2 on Windows XP OS with RODBC version Version:
1.3-0.
Has anyone out there in the R user community successfully appended records
to a DB2 table on a remote database using the sqlSave function in the RODBC
package? (or by any other means from R?)
I posed a similar question a few months ago and unfortunately, did not
receive a response. I was hoping recent upgrades to
2010 Feb 24
1
problem with looping on sqlSave()
Dear R users,
I have a follow-up question on sqlSave().
Since most of the output from the tests I use are lists, I would like to
loop to export each element of the list and append it to the sheet.
Here is what I do:
> library(RODBC)
> test <- structure(list(m = structure(c(0.090909090909091,
0.181818181818182,
0.272727272727273, 0.363636363636364, 0.454545454545455,
2009 May 29
1
RODBC sqlSave with DB2
I am running R version 2.8.1 on Windows XP OS.
This works fine. (Data.frame dta is created with records from the DB2
table.):
sql <- "select * from storage.testappend_slt order by uut"
dta <- sqlQuery(channel,sql)
But when I try to append records (from data.frame newdta) to the same DB2
table. I get an error:
sqlSave(channel, newdta, tablename = storage.testappend_slt, append
2017 Jul 12
2
consulta por varTypes de sqlSave en RODBC
Buen dia compañerxs de R, les traigo una pregunta bastante especifica.
En el trabajo me estan requiriendo el uso de SQL, asi q estoy aprendiendo a
usarlo desde R, con el paquete RODBC.
Mi problema puntual es que al crear una tabla en el servidor SQL a partir
de un data frame en R (usando la funcion sqlSave) no puedo definir el tipo
de variables que quiero usar en el data frame.
Segun entiendo
2017 Jul 13
2
consulta por varTypes de sqlSave en RODBC
Buen dia Javier, muchas gracias por tu ayuda y el script compartido.
Me va a servir como ayuda para seguir aprendiendo sobre RODBC pero no
encuentro una solucion para este problema puntual de poder definir el tipo
y ancho de las variables, q segun creo se hace con el argumento varTypes.
Si alguien tien algun ejemplo donde haya usado la SqlSave y VarTypes, me
sera de gran ayuda.
Abrazo a todos
2007 Feb 20
2
RODBC problems with unixodbc
Hi,
I noticed that if a column is named "end" in a data frame (table.df
below), it leads to errors when trying to sqlSave()'it to a postgresql
connection:
---<---------------cut here---------------start-------------->---
con <- odbcConnect("PostgreSQL-DB", uid="user", pwd="password",
case="postgresql")
R>
2011 Feb 26
0
Problem with RODBC sqlSave
Hi,
I'm able to establish a successful odbc connection using RODBC 1.3-2 on Win
7 and R 2.12.0. But I'm getting the following error message when I try to
save a data frame into the debase as shown below.
library(RODBC)
bbdb <- odbcConnect("bbdb")
odbcGetInfo(bbdb) # returns ok
sqlSave(bbdb, USArrests, rownames = "state", addPK=TRUE) # example from the
RODBC manual
2008 Nov 25
1
Efficient passing through big data.frame and modifying select
> -----Original Message-----
> From: William Dunlap
> Sent: Tuesday, November 25, 2008 9:16 AM
> To: 'johannes_graumann at web.de'
> Subject: Re: [R] Efficient passing through big data.frame and
> modifying select fields
>
> > Johannes Graumann johannes_graumann at web.de
> > Tue Nov 25 15:16:01 CET 2008
> >
> > Hi all,
> >
> >
2017 Jul 13
2
consulta por varTypes de sqlSave en RODBC
Hola Javier, si no estoy entendiendo mal, lo q deseo hacer no se trata de
configurar los parametros SQL, sino solo de colocar un vector en el
argumento VarTypes de la funcion sqlSave.
El manual especifica esa opcion, pero no da ningun ejemplo de como usarla.
*varTypes an optional named character vector giving the DBMSs datatypes to
be used for*
*some (or all) of the columns if a table is to be
2008 Dec 23
1
quotation problem/dataframe names as function input argument.
Dear R friends:
Can someone help me with the following problem? Many thanks in advance.
# Problem Description:
# I want to write functions which take a (character) vector of dataframe
names as input argument.
# For example, I want to extract the number of observations from a number of
dataframes.
# I tried the following:
nobs.fun <- function (dframe.vec)
{
nobs.vec <-
2012 Mar 30
1
How to use access results of gregexpr in data frames
Hello,
I'm trying to figure out how to find the index of the second occurrence of "/" in a string (which happens to represent a date) within a data frame column.
I've used the following code successfully to find the first instance of "/".
dframe <- data.frame(date=c("5/14/2011", "4/7/2011"))
dframe$x1 <- regexpr("/", dframe[, 1])
2011 Jun 09
3
How to subset based on column name that is a number ?
Hi,
I have a data frame with column names "1", "2", "3", ... and I'd like to extract
a subset based on the values in the first column. None of the methods I tried
worked (below).
x <- subset(dframe, 1 = = "My Text")
x <- subset(dframe, "1" = = "My Text")
x <- subset(dframe, names(dframe)[1] = = "My Text")
Q
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
2005 Nov 09
2
error in NORM lib
Dear alltogether,
I experience very strange behavior of imputation of NA's with the NORM
library. I use R 2.2.0, win32.
The code is below and the same dataset was also tried with MICE and
aregImpute() from HMISC _without_ any problem.
The problem is as follows:
(1) using the whole dataset results in very strange imputations - values
far beyond the maximum of the respective column, >
2010 Oct 13
4
Change global env variables from within a function
Hi,
I've looked all over for a solution to this, but haven't had much look
in specifying what I want to do with appropriate search terms. Thus I'm
turning to R-help.
In the process of trying to write a simple function to rename individual
column names in a data frame, I ran into the following problem: When I
rename the columns within my function, I can't seem to get it to
2006 Jan 20
3
Selecting data frame components by name - do you know a shorter way?
Hi! I suspect there must be an easy way to access components of a data frame by name, i.e. the input should look like "name1 name2 name3 ..." and the output be a data frame of those components with the corresponding names. I ´ve been trying for hours, but only found the long way to do it (which is not feasible, since I have lots of components to select):