Description Usage Arguments Details Value Note Author(s) Examples
View source: R/connectDatabase.R
Allows the user to create a connection with the compendium database in the MySQL
server
1 | connectDatabase(user, password, host = "localhost", dbname = "compendium", port = 3306)
|
user |
character string defining the |
password |
character string defining the password required to connect to the |
host |
character string defining the host name. The default value is
|
dbname |
character string defining the name of the compendium database to
which one wants to establish a connection. The default value is
|
port |
port number used to connect to the |
The compendium database has to be created first, see the package vignette for how to do this from the MySQL prompt.
A list
with components
connect |
a component of class |
user |
character string containing the user name |
password |
character string containing the password |
host |
character string containing the host name |
port |
port number used to connect to the |
dbname |
character string containing the database name |
Do not check the returned value of this function, since this might abort the current R session.
summary(conn)
can be used to check the returned list
.
Umesh K. Nandal
1 2 3 4 5 | ## Not run:
# Connect to a database with name "compendium"
conn <- connectDatabase(user="usrname",password="passwd",host="localhost",dbname="compendium")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.