rmysql

installing RMySQL gives error RS-MySQL.h:32:19: fatal error: mysql.h: No such file

旧巷老猫 提交于 2019-12-19 04:08:14
问题 I tried to install the RMySQL-library (R version 2.14.2, WinXP on 32bit) but got the following error message: install.packages("D:/R/library/RMySQL_0.9-3.tar.gz",repos=NULL, type="source") ... RS-MySQL.h:32:19: fatal error: mysql.h: No such file or directory compilation terminated. make: *** [RS-MySQL.o] Error 1 ERROR: compilation failed for package 'RMySQL' * removing 'C:/Dokumente und Einstellungen/Giordano/R/win-library/2.14/RMySQL' Warning message: In install.packages("D:/R/library/RMySQL

RMySQL, Shiny and PHP cloud

拜拜、爱过 提交于 2019-12-13 06:58:56
问题 I'm trying to develop R shiny application using MySQL database. I'm trying to use PHP cloud and its MySQL database. And my Shiny application is in shiny cloud environment. I'm deploying my application using R Studio. So how I can connect RMySQL to MySQL database in the PHP cloud using R Studio. I tried installing RMySQL in R Studio but it gives me this error. Warning: running command 'sh ./configure.win' had status 1 ERROR: configuration failed for package 'RMySQL' 来源: https://stackoverflow

R dbBuildTableDefinition mysql rmysql error writing a table

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-13 05:00:18
问题 I am working on R installed on Linux/Ubuntu system. I want to write a table to a database. Why doesn't it work? I was able to drop tables and also able to display data present in a table. In short my dbGetQuery and dbRemoveTable work perfectly. employee <- c('John Doe','Peter Gynn','Jolie Hope') salary <- c(3, 2, 1) employ<- data.frame(employee, salary) > employ employee salary 1 John Doe 3 2 Peter Gynn 2 3 Jolie Hope 1 > dbBuildTableDefinition(dbh,"ee",employ) [1] "CREATE TABLE ee \n( row

using session$onsessionend to disconnect rshiny app from the mysql server

给你一囗甜甜゛ 提交于 2019-12-12 03:56:41
问题 I obtained this code from R Shiny Gallery here:http://shiny.rstudio.com/gallery/reactive-poll-and-file-reader.html function(input, output, session) { # Create a random name for the log file logfilename <- paste0('logfile', floor(runif(1, 1e+05, 1e+06 - 1)), '.txt') # ============================================================ # This part of the code writes to the log file every second. # Writing to the file could be done by an external process. # In this example, we'll write to the file from

RMySQL installation issue with Mysql 5.5

巧了我就是萌 提交于 2019-12-11 11:59:33
问题 I'm quite new to R, but I've some experience in programming. I'm trying to install RMySQL on Windows 7 with MySQL Workbench 5.2 and I keep on getting the same errors. I've already checked different procedures, but keep on getting stuck: http://vhaguiar.wordpress.com/2011/06/06/r-how-to-install-rmysql-in-windows-7-with-mysql-5-5/ http://biostat.mc.vanderbilt.edu/wiki/Main/RMySQL MySQL is up and running, I have moved libmysql.lib and libmysql.dll, but I keep on getting the following errors. I

R data.table if then sumif lookup using join

ε祈祈猫儿з 提交于 2019-12-11 08:36:25
问题 I am looking to look up the individual id in events_table and calculate the total_duration as the sum of the duration of all events prior to date . The duration is the time between the date_start and date (table1), unless the event ended (i.e. has a date_end ), in which case if date_end < date , duration = date_end - date_start . In pseudo code: IF (date>date_start) Then{ IF(date_end < date & date_end != NA) Then{ duration = date_end-date_start } else if (date_start < date) { duration = date

SQL query for calling multiple columns with conditions(with NAs)

寵の児 提交于 2019-12-11 05:59:28
问题 This is a continuous question from my previous question. I want to write an SQL query calling for several columns with conditions. I'm working on R Studio using RMySQL package. My server is MySQL. The table looks like this. organisation A B C D Ikea 2018-04-01 2018-05-07 2018-05-09 2018-05-01 Ikea 2018-06-01 2018-05-03 2018-05-29 NA Orange 2018-04-02 2018-05-01 2018-07-08 2018-05-26 Ikea 2018-06-02 2018-05-01 NA 2018-05-26 Nestle 2018-06-02 2018-05-01 NA 2018-05-26 Ikea NA 2018-05-05 2018-04

Can't close mysql connections in R

天涯浪子 提交于 2019-12-11 03:47:29
问题 Would appreciate any tips regarding how to close MySQL connections in R. Used dbDisconnect() , but it kept throwing an error: Error in (function (classes, fdef, mtable) : unable to find an inherited method for function 'dbDisconnect' for signature '"MySQLConnection" 回答1: In order to disconnect you need to give dbDisconnect() the right connection. Make sure your connection does have a name in the first place. Always open a connection with mydb <- dbConnect(..) As soon as you don't need it

Unknown column in field list error Rmysql

天大地大妈咪最大 提交于 2019-12-10 22:19:10
问题 I wrote a data.frame using dbWriteTable(con, name='db_all', df, overwrite=T, row.names=F) sucessfully to MySQL using RMySQL. Now I have a second data frame which has a similar structure and try to use dbWriteTable(con,name='db_all',df1,append=T,row.names=F,overwrite=F) which gives me Error in .local(conn, statement, ...) : could not run statement: Unknown column 'zzz' in 'field list'> In my SQL table I don't have that column name yet and would expect my append=T will add this column in my SQL

R shiny - pop up window with options

一笑奈何 提交于 2019-12-09 18:10:30
问题 Im creating a shiny app that queries an SQL database. I want to warn the user if the queried data has entries on two dates. Moreover, I want the user to be able to select which set of data to query. Here is an example: Server # Create example data set.seed(10) MeasurementA <- rnorm(1000, 5, 2) MeasurementB <- rnorm(1000, 5, 2) Wafer <- rep(c(1:100), each=10) ID <- rep(c(101:200), each=10) Batch <- rep(LETTERS[seq(from=1, to =10)], each=100) Date <- rep(seq(as.Date("2001-01-01"), length.out =