Displaying 20 results from an estimated 3000 matches similar to: "Insert a recorde into a table using SQL"
2008 May 14
2
basename/dirname produce incorrect results
The incorrect result incurs when the file path contains Chinese character.
It seems that dirname/basename action on unit of byte instead of char, so
the result in the following example is half of what is expected.
> g<-"d:\\$BG!2L4^M-CfJ8(B\\$BG!2L4^M-CfJ8(B.txt"
> dirname(g)
[1] "d:/$BG!2L4^(B"
> basename(g)
[1] "$BG!2L4^M-(B"
--
HUANG Ronggui,
2008 Jan 21
3
Need suggestions about GUI
What I want to do is:
1, creat a text box, insert text into that box.
2, select chunk of of the text by mouse, and link it to a lable. so I would
like a way to get that chunk of text.
Can I do such job with tcltk? Any relavant tutorial materials?
Thanks
--
HUANG Ronggui
Bachelor of Social Work, Fudan University, China
Master of sociology, Fudan University, China
Ph.D. Student , CityU of
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.
2008 Jun 07
1
Problem of installing Matrix
[wincent at PC-BSD]export MAKE=gmake
[wincent at PC-BSD]sudo R
.....
> install.packages("Matrix")
--- Please select a CRAN mirror for use in this session ---
Loading Tcl/Tk interface ... done
trying URL 'http://bibs.snu.ac.kr/R/src/contrib/Matrix_0.999375-9.tar.gz'
Content type 'application/x-gzip' length 1483674 bytes (1.4 Mb)
opened URL
2013 Jul 15
2
Serialize data.frame to database
Dear R-Users,
I need a very fast and reliable database solution so I try to serialize a data.frame (to binary data) and to store this data to an SQLite database.
This is what I tried to do:
library(RSQLite)
con <- dbDriver("SQLite")
db <- dbConnect(con, "test")
dbSendQuery(db, 'CREATE TABLE frames("simID" INT, "data" BLOB)')
data.bin <-
2008 Nov 24
1
RQDA-0.1.5 is released
RDQA is a package for Qualitative Data Analysis built upon R. It works
both on the Windows and Linux/FreeBSD platforms. RQDA is an
easy-to-use tool to assist in the analysis of textual data. At the
present, it supports only plain text format data. All the information
is stored in SQLite database via the R package of RSQLite. The GUI is
based on RGtk2, via the aid of gWidgetsRGtk2. It includes a
2008 Nov 24
1
RQDA-0.1.5 is released
RDQA is a package for Qualitative Data Analysis built upon R. It works
both on the Windows and Linux/FreeBSD platforms. RQDA is an
easy-to-use tool to assist in the analysis of textual data. At the
present, it supports only plain text format data. All the information
is stored in SQLite database via the R package of RSQLite. The GUI is
based on RGtk2, via the aid of gWidgetsRGtk2. It includes a
2008 Jan 31
2
Delete/insert rows in data matrix
Hello all,
I have the following problem. I want to insert blank rows in an data frame
so as to make it comparable with another data frame with more rows. How can
I insert these rows?
If this is not solvable, then, alternatively, is it easy to delete rows from
a data frame?
Thanks for helping,
Eleni
[[alternative HTML version deleted]]
2008 May 07
2
Citation in the literature
Hello everyone,
Very quick question: How should I cite the use of R in a publication ?
Thanks in advance.
Sebastien
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
2008 Sep 15
2
S4 coercion responsibility
Should functions or the user be responsible for coercing an S4 object
argument containing the proper object (and thus should below be
considered a bug in the packages or not)?
The example is with RSQLite but the same thing happens with RMySQL, and
other DBI packages.
> library("RSQLite") Loading required package: DBI
> m <- dbDriver("SQLite")
> con <-
2008 Jan 22
5
how to google search for "R"
I really have headache when I do google search for information about "R".
Any tricks or tips?
thx.
2007 Dec 27
2
Problem of lmer under FreeBSD
I encounter such problem with lmer under FreeBSD, but not under
Windows. Anyone knows why? Thanks.
> example(lmer)
lmer> (fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy))
Error in UseMethod("as.logical") : no applicable method for "as.logical"
> traceback()
9: as.logical(EMverbose)
8: as.logical(EMverbose)
7: lmerControl()
6:
2008 Oct 16
3
how to count unique observations by variables
Dear R-helpers,
I have a data frame with 3 variables, each record is a unique combination of
the three variables. I would like to count the number of unique values of v3
in each v1, and save it as a new variable v4 in the same data frame.
e.g.
df1
[v1] [v2] [v3]
[1,] "a" "C" "1"
[2,] "b" "C" "2"
[3,] "c" "B"
2008 May 10
3
question about subseting a dataframe
Hi!
I am using R version 2.7.0 and am working on a panel dataset read into R as
a dataframe; I call it "ex". The variables in "ex" are: id year x
id: a character string which identifies the unit
year: identifies the time period
x: the variable of interest (which might contain NAs).
Here is an example:
> id <- rep(c("A","B","C"),2)
>
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",
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")
2012 May 09
2
Problem with SQLDF - Error in sqliteExecStatement(con, statement, bind.data) : RS-DBI driver: (error in statement: no such table:
Hi All,
I am having trouble executing SQL statements on a few dataframes, but the
funny thing is that I am able to execute the statement on some other
dataframes.
To test, I have 2 very small dataframes (6 rows and some columns). One is
'lessliq', the dput is given below.
> dput(head(lessliq))
structure(list(V1 = c(50464677L, 50464846L, 50432581L, 50426614L,
50504329L, 50504735L), V2
2013 Feb 12
0
How do I solve a disk I/O error with RSQLite?
Hi there,
I had an error when using RSQLite. My code and the error message are
the following:
> dbGetQuery(sql.dispersion,
+ "create table monthly_data_temp as
+ select a.*, b.industry
+ from monthly_data as a left join
+ siccd_industry_ff49 as b
+ on a.siccd = b.siccd
+ order by permno, date")
Error