You can use R to analyze directly, in the following steps:
1, R download RODBC package, installed.
2, in Http://dev.mysql.com/downloads/connector/odbc
Download MySQL ODBC and install it properly.
3. Windows: Control Panel, administrative Tools, data source (ODBC), double-click Add, select MySQL ODBC driver
Fill in: Data source name an entry you want to use the name, you name it, for example: Mysql_data;
Description A random fill, such as MyData
TCP/IP server fills in the native server IP, generally: 127.0.0.1
User fills in your MySQL username
Password fill in your MySQL password
The database will then appear in your MySQL database, select a database.
Are you sure.
4. Open the interface of R to call the database:
1 2 3 4 |
library ( R ODBC ) ; channel <- odbcconnect ( "MySQL _ data" , uid = "root" , pwd = "123 ) ; &NBSP SqlTables ( channel ) ; #查看数据中的表 Data <- sqlFetch ( channel , "Kegg" ) # View the contents of the table, save in the data frame |