Nothing
library( "easyrodbcmysql" )
testMySQL <- FALSE # Set to TRUE to run some tests
# after modifying the edb() part below
# with your own database setting
### Windows only:
if( (Sys.info()[[ "sysname" ]] == "Windows") & testMySQL ){
### Describe the database (NB: this is not a connection)
myDb <- edb(
dbType = "RODBC_MySQL",
dbSourceName = "nameOfODBCSource", # or any name you like
dbName = "nameOfDatabase",
dbLogin = "yourUserName",
dbPwd = "yourPassword",
dbHost = "127.0.0.1",
dbPort = 3306
) #
### Register the data source in ODBC
edbDataSource( myDb, verbose = TRUE )
### Use the database:
# List the column names in a table:
edbColnames( edb = myDb, tableName = "WRB_SOIL_GROUP" )
# More details:
edbColnames(
edb = myDb,
tableName = "WRB_SOIL_GROUP",
onlyNames = FALSE # different too!
) #
### Un-register the data source in ODBC (windows only)
edbDataSource( myDb, trash = TRUE )
} #
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.