Tag Archives: RStudio

How to set your R environment with RStudio and DotNet library for C#

How to set your R environment with RStudio and DotNet library for C#

IMPORTANT NOTE:  This train of thought has been abandoned with too many connecting issues with R.NET which makes this entire process useless. Sorry but I cannot proceed as it is not safe nor have the authors of all this software thought of backward incompatibility. This is why you stick with Matlab!!!


Download R and RStudio

Download R for Windows from your nearest location http://www.r-project.org/

Download RStudio IDE http://www.rstudio.com/

You want to add R_HOME to your Windows Environment Variables and add to the path of R.DLL. Mine is located under C:\Program Files\R\R-3.0.2\bin\x64

.NET library for C# (R.NET)

http://rdotnet.codeplex.com/

Download from:

http://rdotnet.codeplex.com/releases

C# Example of R.NET RDotNetExample

 

How to install R Base with latest update and Rstudio onto Debian Linux #rstats #linux

How to install R Base with latest update and Rstudio onto Debian Linux

apt-get install r-base

http://rwiki.sciviews.org/doku.php?id=getting-started:installation:debian#install_r

Then from http://tata-box-blog.blogspot.ca/2012/03/install-r-2142-in-debian-squeeze.html

First, open a Terminal and open the sources.list file: $ gksudo gedit /etc/apt/sources.list

Then, add these lines at the bottom of the file (Note, I use the UCLA server, but this can be easily changed taking a look here for the mirrors):

## R BACKPORTS deb http://cran.stat.ucla.edu/bin/linux/debian squeeze-cran/ #deb-src http://cran.stat.ucla.edu/bin/linux/debian squeeze-cran/ To install Rstudio download Rstudio deb file from http://www.rstudio.com/ide/download/desktop Install with deb http://linux.about.com/od/ubuntu_doc/a/ubudg21t2.htm

To install Rstudio

 

download Rstudio deb file from
http://www.rstudio.com/ide/download/desktop

Install with deb
http://linux.about.com/od/ubuntu_doc/a/ubudg21t2.htm

Question and Answer to Anyone know R, RStudio, RBG package, or RBloomberg package to help out

Question and Answer to  Anyone know R, RStudio, RBG package, or RBloomberg package to help out

> Hey Bryan,
>
> I ran into a similar situation in my learning curve with R and
> installing some quant finance-specific packages. R-Forge often has
> issues building packages (for one reason or
> another), so that’s why they’re “not available”. That said, you can
> check out the source yourself (using subversion) and build with R CMD
> build and R CMD INSTALL.
>
> I’m on a mac, so in Terminal I modified the following code:
> https://gist.github.com/1861292
>
> Hope that helps!

This was from Jonnie L so thanks to him!

 

 

A nsw
Hey Bryan,

I ran into a similar situation in my learning curve with R and installing some quant finance-specific packages. R-Forge often has issues building packages (for one reason or
another), so that's why they're "not available". That said, you can check out the source yourself (using subversion) and build with R CMD build and R CMD INSTALL.

I'm on a mac, so in Terminal I modified the following code:
https://gist.github.com/1861292

Hope that helps!

Anyone know R, RStudio, RBG package, or RBloomberg package to help out

 

Anyone know R, RStudio, RBG package, or RBloomberg package to help out

Get in touch me if you can help this guys out.

I live in NYC area. I recently got interested in trying out R for some of quant-financial projects.  I have used Matlab before.   I don’t think I can make it to the physical meetup, but I definitely to join the virtual one.

 

One of the things for newbies in R like me is where to get user-specific help.  In my case, I am stumped by not being able to get RBbg working in RStudio, despite having installed the latest R and RBbg package on my Windows 7 machine.   I tried posting on stackoverflow.com, but unsurprisingly it is not of interest to other people since it seems to be a specific problem for my setup.  I am happy to pay some money for someone to debug this for me.   I contacted Revolution Analytics, but the firm focused on big consulting type of projects.    I wonder  if you know of resources that may address my needs.  Perhaps this will be a possible topic for the webinar.

 

 

Youtube video: Proper steps to integrate MongoDB NOSQL database with R on Ubuntu Linux with RStudio

Youtube video: Proper steps to integrate MongoDB NOSQL database with R on Ubuntu Linux with RStudio

Why NOSQL?

When comparing other RDMS including Oracle, MySQL or DB/2 against NOSQL, I was one of those old geezers who thought they were another ‘go fast nowhere’ technology trend.

Boy, was I wrong! I looked at all the options including HBase/Hadoop, Cassandra, Redis, and MongoDB. I found Hbase and Hadoop were difficult to install. The R packages for these were useless as there were few installation documents. Cassandra was easy but the the client support for R either didn’t exist or didn’t work with the RCassandra package. Redis looked awesome and is still one of the best for R thanks to the doRedis R package. The Java examples to shard looked promising too.

Then I revisited everything and came across MongoDB. It seems to have all the advantages of Cassandra and Redis with decent R package support.

NOSQL options and R

After looking at all the options, my recommended NOSQL databases is Redis or MongoDB. It was easy to install Redis but tricky with MongoDB. My recommendation is to install MongoDB with a clean current Ubuntu Linux Desktop version. All you need to do is type the following on the command line:

‘apt-get install mongo’

… and you’re ready to go. It takes care of all the permissions, users, etc. It was so easy that I could have saved a day’s work without going through the hoops I did. A lesson learned, and the time I lost is time you can save!

MongoDB install obstacles and tricks

Here are some current tricks to save you even more time:

Install Open JDK 6 not 7 as it will mess up the RJava install with R

If this happens, keep an eye out for a message that says something to the effect of checking your Linux Java environment. It will say you need to run as root, R CMD java or something similar. This message would be appear in your R console during the RJava package install. My problem came to Java 7 versus 6 which resolved it.

Create your MongoDB mydb data with:

http://www.mongodb.org/display/DOCS/Tutorial
http://pseudofish.com/blog/2011/05/25/analysis-of-data-with-mongodb-and-r/

Once installed, you should be able to do the following within your R shell or RStudio:
for RMongo:

> library(“RMongo”)

Loading required package: RUnit

> mongo <- mongoDbConnect(“mydb”)
> dbShowCollections(mongo)
[1] “system.indexes” “things”
> results <- dbGetQuery(mongo, “nutrient_metadatas”, “{}”, 0, 2)
> results <- dbGetQuery(mongo, “things”, “{}”, 0, 2)
> names(results)
[1] “X_id” “name”
> dbDisconnect(mongo)

[youtube_sc url=”http://www.youtube.com/watch?v=DbhdKBx-lK0″ playlist=”How to, Integrate, MongoDB ,NOSQL, database ,R , Ubuntu, Linux, RStudio ” title=”How%20to%20Integrate%20MongoDB%20NOSQL%20database%20with%20R%20on%20Ubuntu%20Linux%20with%20RStudio%20″]