Displaying 20 results from an estimated 1000 matches similar to: "RpgSQL row names"
2011 Nov 08
1
dbWriteTable with field data type
Hello,
When I do:
dbWriteTable(con, "r.BOD", cbind(row_names = rownames(BOD), BOD))
...can I specify the data types such as varchar(12), float, double
precision, etc. for each of the fields/columns?
If not, what is the best way to create a table with specified field data
types (with the RpgSQL package/R)?
Regards,
Ben
[[alternative HTML version deleted]]
2004 Nov 25
3
Searching for a string in RSQLite
I'd like to search for a particular string in an SQLite database using
RSQLite, but I'm running into problems constructing the query
properly, because of embedded quotes and parens in the string.
Is there a function that escapes these for me, or some other fixup
that would let me do the queries below? In the real situation I don't
have control over what strings get searched for.
2010 Oct 13
2
Rmysql - dbWritetable
Dear Rusers,
I am trying to feed my database with data from a file.
But since my file (2010101000.txt) there`s no headers I am facing problem
because the
result data.frame is not separated my columns.
How could I set variables names for each columns in *dbWriteTable*? I have
tried the command below but I don`t know how to fill the *field.type*option.
dbWriteTable(con, "b20101010",
2010 Aug 12
2
How to building my own datafile
Hi folks,
I'm prepared building my own datafiles, simple file at start, for testing
wondering how to process? Which software will be used,
MySQL/MS-SQL/MS-Excel/Open Office-Calc etc?
On searching I found r-cran-rmysql on Ubuntu repo.
Further searching I found;
RMySQL: R interface to the MySQL database
http://cran.r-project.org/web/packages/RMySQL/index.html
Whether install the above
2017 Aug 29
2
DBI::dbWriteTable syntax error apparently from quotes
I have been successfully using RODBC for a long time (years) to connect to
MS SQL Server from R.
This week I wanted to try using odbc but I am seeing some problems which
may be related to how I set up my driver and/or connection.
The dbWriteTable manual page gives as an example command:
dbWriteTable( pDB$con, "mtcars", mtcars[1:5,])
When I try this I get the following error
Error:
2017 Aug 29
0
DBI::dbWriteTable syntax error apparently from quotes
Double quotes are not legal SQL syntax. Use single quotes.
--
Sent from my phone. Please excuse my brevity.
On August 29, 2017 2:21:44 AM PDT, Eric Berger <ericjberger at gmail.com> wrote:
>I have been successfully using RODBC for a long time (years) to connect
>to
>MS SQL Server from R.
>This week I wanted to try using odbc but I am seeing some problems
>which
>may be
2009 Jun 12
2
Automate a data load and merge
Hi R list,
I would like to automate, or speed up the process from which I take
several separate datasets, stored in .csv formate, import and merge
them by a common variable. So far I have greatly sped up the loading
process but cannot think of a way to automate the merger of all
datasets into a common data.frame.
My apologies if this has been covered, any R search suggestions are
2010 Jan 25
1
RMySQL Append data.frame to table
I have a data.frame obj with 5 columns whose colnames match the fields
in my "contact" table. The only other field my MySQL table has is an id
field which is the PK and is set to auto increment.
I'd like to load this data.frame using something like:
dbWriteTable(con, "contact", dat, append=TRUE)
However, I get this error:
Error in mysqlExecStatement(conn, statement,
2012 Jun 12
1
Not able to write to PostgreSQL database using "dbWriteTable"
Dear R User's
Please help me to debug this issue. I am trying to write some data ( i=
6) to PostgreSQL database, but it not writing.
Is there any issue in the way I use "dbWriteTable"?
++++++++++++++++++ Source Code ++++++++++++++++++++++++
library("DBI")
library("RPostgreSQL")
drv1 <- dbDriver("PostgreSQL")
i=6
connAE1 <- dbConnect(drv1,host
2006 Mar 10
5
PDF::Writer Simpletable Iteration
Hello All:
I have been working with <a
href="http://ruby-pdf.rubyforge.org/pdf-writer/index.html">Austin
Ziegler''s PDF::Writer</a> as a means to produce PDF documents from my
Rails app. I am stumped on how to iterate through a collection of items
and output them in a table format. The way I have tried it so far only
returns the last item in the collection -
2006 Mar 15
3
"\r" with RSQLite
What am I doing wrong, or is the \r that I'm getting
in the example below a bug?
> a <- (1:10)
> b <- (LETTERS[1:10])
> df <- as.data.frame(cbind(a, b))
>
> df
a b
1 1 A
2 2 B
3 3 C
4 4 D
5 5 E
6 6 F
7 7 G
8 8 H
9 9 I
10 10 J
> library(RSQLite)
> drv <- dbDriver("SQLite")
> con <- dbConnect(drv, dbname = "Test")
2006 Mar 15
3
"\r" with RSQLite
What am I doing wrong, or is the \r that I'm getting
in the example below a bug?
> a <- (1:10)
> b <- (LETTERS[1:10])
> df <- as.data.frame(cbind(a, b))
>
> df
a b
1 1 A
2 2 B
3 3 C
4 4 D
5 5 E
6 6 F
7 7 G
8 8 H
9 9 I
10 10 J
> library(RSQLite)
> drv <- dbDriver("SQLite")
> con <- dbConnect(drv, dbname = "Test")
2007 Jun 06
1
Question: RMySQL bulk load/update one column, dbWriteTable()?
Hi,
I have a question reading using RMySQL trying to load one R vector into a
table column. To be more specifically, the table is there populated. Now I
add a new column and want to populate this.
Can some colleagues on this list teach me how to do this? I know how to
write one R object/table into MYSQL table using dbWriteTable. But in this
situation, I just want to do one column.
Thanks
2002 Dec 18
1
A little problem handling logicals in RMySQL under R1.6.1
There is a little problem in handling logicals in RMySQL:
# here is the MySQL connection
> con
<MySQLConnection:(1816,0)>
# here is the data frame
> print(a<-data.frame(x=c(TRUE,FALSE),y=c(FALSE,TRUE)))
x y
1 TRUE FALSE
2 FALSE TRUE
# as promised, the two data frame columns are identified as logicals and
# the field types are set to tinyint
> field.types <-
2008 Apr 11
1
SQL INSERT using RMySQL
Hi All,
I've finally gotten around to database access using R. I'm happily
extracting rows from a MySQL database using RMySQL, but am having
problems appending rows to an existing table.
What I *want* to do is to append rows to the table, allowing the
database to automatically generate primary key values. I've only
managed to add rows by using
dbWriteTable( con,
2008 May 12
1
Insert a recorde into a table using SQL
Dear list,
I want to insert a recorde into a SQLite table by dbGetQuery(), but
there is a problem when the value contains quotation mark.
> dd<-data.frame(txt=c("having both ' and \" in character.","OK"))
> library(RSQLite)
Loading required package: DBI
> con<-dbConnect(dbDriver("SQLite"),":memory:")
>
2010 Jun 27
2
Ways to work with R and Postgres
Hi,
I post this message to the general r-help list hoping anyone within a wider range have suggestions:
There are three ways to integration R and postgres, especially on 64bit Microsoft windows Platform,
1. via RODBC package, which has 32 bit and 64 bit version for windows
2. via RPostgres interface, which only has 32bit version currently
3. via plr for Greenplum, which only supports a
2008 Sep 11
2
database table merging tips with R
I have not devoted time to setting up ROracle since binaries are not available and it seems to require some effort to compile (see http://cran.r-project.org/web/packages/ROracle/index.html). On the other hand, RODBC worked more or less magically once I set up the data sources.
What is your success using ROracle and why would it be preferable to RODBC ?
-Avram
On Thursday, September 11,
2011 Nov 08
2
multi-line query
Hello,
I'm using package RpgSQL. Is there a better way to create a multi-line
query/character string? I'm looking for less to type and readability.
This is not very readable for large queries:
s <- 'create table r.BOD("id" int primary key,"name" varchar(12))'
I write a lot of code, so I'm looking to type less than this, but it is
more readable from
2010 Nov 15
5
How to Read a Large CSV into a Database with R
Hi, I'm working in R 2.11.1 x64 on Windows x86_64-pc-mingw32. I'm trying to
insert a very large CSV file into a SQLite database. I'm pretty new to
working with databases in R, so I apologize if I'm overlooking something
obvious here.
I'm trying to work with the American Community Survey data, which is two
1.3GB csv files. I have enough RAM to read one of them into memory,