602 search results for "sql"

Connecting TOAD For MySQL, MySQL Workbench, and R to Amazon AWS EC2 Using SSH Tunneling

January 7, 2014
By
Connecting TOAD For MySQL, MySQL Workbench, and R to Amazon AWS EC2 Using SSH Tunneling

I often use Amazon EC2 to store and retrieve data when I need either additional storage or higher computing capacity.  In this tutorial I’ll share how to connect to a MySQL database so that one can retrieve the data and do the analysis.  I tend to use either TOAD for MySQL or MySQL Workbench to run

Read more »

Translating between R and SQL: the basics

November 8, 2013
By

An introductory comparison of using the two languages. Background R was made especially for data analysis and graphics.  SQL was made especially for databases.  They are allies. The data structure in R that most closely matches a SQL table is a data frame.  The terms rows and columns are used in both. A mashup There The post Translating...

Read more »

Databases for text analysis: archive and access texts using SQL

November 7, 2013
By

This post is a collection of scripts I've found useful for integrating a SQL database into more complex applications. SQL allows quickish access to largish repositories of text (I wrote about this at some length here), and are a good starting point for...

Read more »

Package sqldf eases the multivariable sorting pain

August 1, 2013
By

This will be a quick one.  I was trying to sort my dataframe so that it went in ascending order on one variable and descending order on another variable.  This was really REALLY bothersome to try to figure out with … Continue reading →

Read more »

Create SQL Rules from rpart model

July 19, 2013
By

Mapping output of rpart tree to SQL statements is not easy. In rpart package you have to print out rules and then manually write SQL CASE statement. Fortunately, we can write new function to do this job. To test the function, I will use dataset german...

Read more »

How R will turn into SQL

July 16, 2013
By
How R will turn into SQL

Up until very recently the only way of running R code was through the standard R distribution. Of course you could use another IDE, but somewhere underneath it all you would be running the same, standard R engine from the R-core team. This is no longer your only option. A couple of weeks ago Radford

Read more »

R and PostgreSQL – using RPostgreSQL and sqldf

July 1, 2013
By

PostgreSQL and R can often be used together for data analysis - PostgreSQL as database engine and R as statistical tool. In this article you will learn how to access data stored in PostgreSQL database and how to write the data back using RPostgreSQL an...

Read more »

Pivot Tables for R: Try sqldf

May 21, 2013
By

Pivot tables are a a growing staple for analysis in excel yet they remain limited to the functionality which Microsoft has chosen to include. Typical operations are the inclusion of filters, choice over rows, columns, and maths operations. In R … Continue reading →

Read more »

Guide to accessing MS SQL Server and MySQL server on Mac OS X

April 6, 2013
By

Native GUI client access to MS-SQL and MySQL We can use Oracle SQL Developer with the jTDS driver to access Microsoft SQL Server. Note: jTDS version 1.3.0 did not work for me; I had to use version 1.2.6. Detailed instructions can be found here. We can use MySQL Workbench to access MySQL server. Setup is... Read more »

How not to reveal your MySQL DB login/password when sharing code on GitHub or BitBucket?

March 19, 2013
By

Solution: use your ~/.my/cnfInside your ~/.my.cnf file define the connection parameters to your databases. For example, here I define two groups called local and toto:user = rootpassword = ultra_secrethost = localhostuser = capitaine_flamp...

Read more »