I want to write an SQL query calling for several columns with a bit complicated conditions. I'm working on R Studio using RMySQL package. My server is MySQL.
The table looks like this.
organisation Tour_ID A B C …
Transferring an R data frame to a MySQL (MariaDB) database table, I get the following error: Lost connection to MySQL server during query
Example data can be loaded in R with this command
cntxt <-…
I am trying to read a few excel files into a dataframe and then write to a MySQL database. The following program is able to read the files and create the dataframe but when it tries to write to the db using dbWriteTable command, I get an error…
I have a working Shiny App that queries a remote MySQL database via pool that I can run on my local machine.
The MySQL server has whitelisted shinyapps.io IP addresses.
When I deploy it to shinyapps.io, I get this error: …
I have to cycle through several sets of data stored separately in individual csv files - about 1500 files. Each file represents the amount of activity for a given day, and the amount of data in each file varies from basically nothing to huge.
My…
Well, the conversion with as.double appears to work, but then adding a non-integral number gets truncated back to integer. For example, this is the setup:
geo <- fetch.data.from.mysql(...)
> head(geo$total_time)
[1] 1586 165 5339 1586 2895 1178
>…
In mysql database, have data serialized by php as below:
"a:564:{s:13:\"caltime\";s:6:\"65.26\";
I use Rmysql to query these data, but donot know how to unserialize them in R.
Thank for any help!
I have connected to a mysql database through the RMySQL package using this statement:
con<-dbConnect(drv=RMySQL::MySQL(max.con=1,fetch.default.rec=500),host="host",dbname="dbname",password="psswd",user="user"))
So far no issues. When I…
I have a data frame containing columns 'Quarter' having values like "16/17 Q1", "16/17 Q2"... and 'Vendor' having values like "a", "b"... .
I am trying to write this data frame into database using
query <- paste("INSERT INTO cc_demo…
I am reading a table from a SQL database, with a column of cities in (English, Arabic and possibly other languages). The encoding type for all is Unknown, when I try to force them using Encoding, some change and some remain Unknown.
I tried using…
I have many table that I am saving to a MariaDb in AWS RDS. I can manually save the tables. However I want to create a loop to do and I can't figure out the syntax on the dbWriteTable command.
library(RMySQL)
dbWriteTable(con, "Account" ,…
I need to get data from an old MySQL server and I'm getting the following error when trying to connect to it with RMySQL or DBI packages:
Error in .local(drv, ...) :
Failed to connect to database: Error: Connection using old (pre-4.1.1)…
I want to get a few hundred separate databases into r from mysql. I can get them in separately but I do not know how to make a loop/function/apply to get all of them in at once.
Here is how I get them in separately.
library(RMySQL)
mydb =…
I am trying to query data from a mysql database, which contains some strings, of course. For the connection and data retrieval I am using RMySQL in R, which works fine. Apart from one thing: the strings I am retrieving seem not to be in utf8. But I…
I’m newbie to R with RStudio using Mac(OS X).
I successfully use sequel Pro to see DB with like this.
I use dbConnect with RMySQL and DBI(below code) with RStudio.
library(DBI)
library(RMySQL)
con <- dbConnect(RMySQL::MySQL(),
…