Quick R Setup

Install Base R Packages

https://cran.r-project.org/bin/linux/ubuntu/

Download R Studio

https://www.rstudio.com/products/rstudio/download/

 

> library(reshape)
> library(RMySQL)
Loading required package: DBI

 

> library(fPortfolio)
Loading required package: timeDate
Loading required package: timeSeries
Loading required package: fBasics

 

> install.packages("PerformanceAnalytics")

http://www.r-bloggers.com/accessing-mysql-through-r/

install.packages("RMySQL")
library(RMySQL)

Connecting to MySQL:
Once the RMySQL library is installed create a database connection object.

mydb = dbConnect(MySQL(), user='user', password='password', dbname='database_name', host='host')

> mydb = dbConnect(MySQL(), user='root', password='', dbname='mindchildraw', host='localhost')

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.