similar to: RMySQL DBI question

Displaying 20 results from an estimated 1000 matches similar to: "RMySQL DBI question"

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,
2009 Jan 10
0
RMySQL CREATE TABLE error
Hi all- I am stumped. The code in A. returns errors at lines 14 and 15 and fails to load series1 and series2. However, in B., if temp1 and temp2 are called again (which returns a "Table exists" error; see lines 14-17 in B.) series1 and series2 load correctly. Any ideas? Also-I am open to any suggestions to improve the code as I am a horrific programmer. Thanks A. 1 >
2007 Jun 04
2
RMySQL question, sql with R vector or list
Hi, I am trying to write a RMySQL sql script inside R such that part of the SQL would be R list or vector. For example, I want to select * from Atable where ID would equal to a members of R list or vector of "1, 2, 3". Here the ID list was generated inside R and then try to feed to mysql to call to get additional data sets. Can someone on the list help? Thanks. -- Waverley @ Palo
2009 Jul 25
4
ROCR package question
I use ROCR to plot multiple runs' performance. Using the sample code as example: # plot ROC curves for several cross-validation runs (dotted # in grey), overlaid by the vertical average curve and boxplots # showing the vertical spread around the average. data(ROCR.xval) pred <- prediction(ROCR.xval$predictions, ROCR.xval$labels) perf <- performance(pred,"tpr","fpr")
2010 Aug 22
4
how to implement string pattern extraction in R
Hi, In perl, to get a substring matching a particular pattern can be implemented like the following example: $x = "AAAA.txt"; if ($x=~ /(.*?)\.txt/){ $prefix = $1; } So how to do the same thing in R? Can someone provide me the code sample? Thanks much in advance. -- Waverley @ Palo Alto
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
2010 Sep 03
3
R program google search
Hi, Can someone help as how to use R to program google search in the R code? I know that other languages can allow or have the google search API If someone can give me some links or sample code I would greatly appreciate. Thanks. -- Waverley @ Palo Alto
2012 Mar 30
0
RMySQL and german umlaute
Hi list, I have some trouble to setup RMySQL correctly to work with german umlaute: > library(RMySQL) Loading required package: DBI > pg <- dbDriver("MySQL") > con <- dbConnect(pg, username="dummy", host="localhost", password="", dbname="ga1prosp") > dbGetQuery(con, statement="SELECT * FROM K?rperma?e;") Error in
2010 Mar 04
1
mysqlWriteTable . error in your SQL syntax?
Hi, Can somebody advice on weird mysqlWriteTable bug. > mysqlWriteTable(conn, 'comparison',design2, row.names = F, overwrite=T) Error in mysqlExecStatement(conn, statement, ...) : RS-DBI driver: (could not run statement: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"condition"
2006 May 22
3
Errors accessing smbfs share after upgrade to redhat ES4.0
I used to mount following share using samba client on RHEL 3.0 without any problems. Then I installed ES4.0 and I started seeing problems with these samba shares. I have following line in fstab to mount the share : //bizgroup/wli1 /wli1 smbfs uid=501,gid=501,credentials=/etc/samba/.smbpassword 0 0 and /etc/samba/.smbpassword contains following username=xxxxxxx
2008 Oct 29
2
how to get the value of aov summary into another variable
Hi, I have a question of aov. e.g. aov.ex = aov(x~y) summary(aov.ex) The aov summary will print to the screen. How can I extract the aov result, in particular the values of Pr(>F) and F value into a vector so that I can use them for other use? Thanks. -- Waverley @ Palo Alto
2009 Feb 07
2
Question about ROCR package
Hi, I have a question about ROCR package. I got the ROC curve plotted without any problem following the manual. However, I don't know to extract the values, e.g. y.values ( I think it is the area under the curve auc measure). The return is an object of class "performance" which have Slots and one of the slot is "y.values". I type the object and I can see them in
2008 Mar 09
2
question about matrix one column values matching a vector of values
Hi, I have a matrix a = matrix (1:16, 4, 4) b = c (2,3) I want to find out which rows of a, where a[,1] equals any values of b? I know that if b is only one value, e.g, b=2, then what I want is a[a[,1] == 2,] But what about if it is not one value but a vector of values? Thanks much in advance. -- Waverley @ Palo Alto
2010 Jul 16
1
Troubles with DBI's dbWriteTable in RMySQL
I am feeling rather dumb right now. I created what I thought was a data.frame as follows: aaa <- lapply(split(moreinfo,list(moreinfo$m_id),drop = TRUE), fun_m_id) m_id_default_res <- do.call(rbind, aaa) print("==========================================") m_id_default_res print("==========================================") ndf <- m_id_default_res[, c('mid',
2007 Jun 27
3
exaustive subgrouping or combination
Dear Colleagues, I am looking for a package or previous implemented R to subgroup and exaustively divide a vector of squence into 2 groups. For example: 1, 2, 3, 4 I want to have a group of 1, (2,3,4) (1,2), (3,4) (1,3), (2,4) (1,4), (2,3) (1,2,3), 4 (2,3), (1,4) ... Can someone help me as how to implement this? I get some imaginary problem when the sequence becomes large. Thanks much in
2008 Feb 21
2
how to create ROC curve for 2 dimensional classifiers
Hi, I understand for 1 d classifiers, you can use ROCR package. Is there a package you can plot ROC curve for 2d classifiers? One of my colleagues asked me about this. I have been quite puzzled, conceptually, how you can do the ROC curve for 2d classifiers. Can someone share his/her knowledge or experience? Thanks in advance. -- Waverley @ Palo Alto
2009 Mar 01
0
How to create temporary table in MySQL
Creating a temp table isn't completely intuitive with MySQL 5 and R 2.8..1, but it can be done. > library(RMySQL) Loading required package: DBI > con <- dbConnect(dbDriver("MySQL"), dbname = "foo", user="me",password="secret") > x<- data.frame(1:10) > colnames(x) <-c("x") > dbWriteTable(con, "#x", x,
2009 Nov 17
2
question about function heatmap
Hi, I am using the function heatmap(stats) to draw a microarray heatmap, columns are samples and rows are gene features. I did a 2D clustering during the heatmap drawing. The features and samples indeed cluster into several blocks both vertically and horizontally. I can get the index of re-ordered rows and columns after the heatmap drawing by typing the the return variable of the heatmap
2006 Nov 03
2
one row matrix
Hi, when I assign a one row matrix to another variable, then somehow R automatically convert that varaible into a list. For example: > a = matrix (12, 3, 4) > b = a[1,] > b [1] 12 12 12 12 Is there a way to enable R automatically make b as a one row matrix , rather than explicitly assign like matrix (b, ncol=1). I have come across a couple of time, that when I try to check how many
2008 Oct 09
1
question of R to do perl matching and matched string extraction
Hi, I want to extract some of the substring via pattern recognition. But I don't know how to do it in R. In perl: my $url = "/pages-cell.net/deepan/sony/"; if($url =~ m/\/(.*)\//g) { my @result = $1; return @result; } How does the same work in R? Thanks much in advance -- Waverley @ Palo Alto