EMR Configuration, replace <a-github-pat>
with a valid PAT:
[{
"configurations":[{
"classification":"export",
"properties":{"GITHUB_PAT":"<a-github-pat>"}
}],
RStudio 1.2 comes with improvements to manage **package repos** and adds better support to packages that provide **testing infrastructure** and **database connectivity**. | |
## Package Repos | |
Some organizations set up private CRAN repos to share internal packages, one way of accomplishing this is by | |
creating a private CRAN repos as described in the [R Admin Guide](https://cran.r-project.org/doc/manuals/R-admin.html#Setting-up-a-package-repository). Other projects rely on `drat` to provide CRAN-compatible repos. With RStudio 1.2 you can easily configure and prioritize: private, primary or secondary CRAN repos through the preferences pane. For instance, at the | |
time of this writting, the `limer` package from the `cloudyr` project was not available on CRAN; however, the `cloudyR` | |
project provides a `drat` repo `http://cloudyr.github.io/drat` that we can easily add as a secondary repo: | |
`IMAGE` |
Verified using Amazon EC2 Suse 12 machine. | |
See [http://download.opensuse.org/repositories/devel:/languages:/R:/patched/](http://download.opensuse.org/repositories/devel:/languages:/R:/patched/), then from [https://forums.opensuse.org/showthread.php/517620-Installing-R](https://forums.opensuse.org/showthread.php/517620-Installing-R): | |
```bash | |
zypper ar -f http://download.opensuse.org/repositories/devel:/languages:/R:/patched/openSUSE_12.3/ R-patched | |
zypper --gpg-auto-import-keys ref | |
zypper in R-patched R-patched-devel | |
``` |
https://api.github.com/search/repositories?q=language:R+stars:%3C10000&page=10&sort=stars | |
... | |
https://api.github.com/search/repositories?q=language:R+stars:%3C1&page=10&sort=stars |
A script to demonstrate using TensorFlow in Spark with Amazon EMR and sparklyr.
install.packages(tensorflow)
devtools::install_github("rstudio/tfdeploy")
sparklyr
, copy some data and the mtcars TensorFlow model:## install | |
```{bash} | |
brew install postgres | |
``` | |
## start | |
```{bash} | |
pg_ctl -D /usr/local/var/postgres -l logfile start |
# Credit: https://www.r-bloggers.com/the-batmans-ecosystem/ | |
f1u <- function(x) ifelse ((abs(x) > 3 & abs(x) <= 7), 3*sqrt(1-(x/7)^2), 0) | |
f1d <- function(x) ifelse ((abs(x) >= 4 & abs(x) <= 7), -3*sqrt(1-(x/7)^2), 0) | |
f2u <- function(x) ifelse ((abs(x) > 0.50 & abs(x) < 0.75), 3*abs(x)+0.75, 0) | |
f2d <- function(x) ifelse ((abs(x) > -4 & abs(x) < 4), abs(x/2)-(3*sqrt(33)-7)*x^2/112-3 + sqrt(1-(abs(abs(x)-2)-1)^2), 0) | |
f3u <- function(x) ifelse ((x > -0.5 & x < 0.5), 2.25, 0) | |
f4u <- function(x) ifelse ((abs(x) > 1 & abs(x) <= 3), 6 * sqrt(10)/7 + (1.5 - 0.5 * abs(x)) * sqrt(abs(abs(x)-1)/(abs(x)-1)) - 6 * sqrt(10) * sqrt(4-(abs(x)-1)^2)/14, 0) | |
f5u <- function(x) ifelse ((abs(x) >= 0.75 & abs(x) <= 1), 9-8*abs(x), 0) | |
fu <- function (x) f1u(x) + f2u(x) + f3u(x) + f4u(x) + f5u(x) |
Install Cassandra: | |
``` | |
curl -OL http://downloads.datastax.com/community/dsc.tar.gz | |
tar -xzf dsc.tar.gz | |
cd dsc-cassandra-3.0.9/bin | |
./cassandra | |
``` | |
Create some tables: |
Install MySQL in OS X using brew: `brew install mysql`, start the service `mysql.server start` and login with `mysql -uroot` to create a database as follows: | |
```{sql} | |
CREATE DATABASE sparklyr; | |
USE sparklyr; | |
CREATE TABLE `person` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`first_name` varchar(30) DEFAULT NULL, | |
`last_name` varchar(30) DEFAULT NULL, |
##A Partial Guide for Building R in Windows | |
**Summary:** Start with this guide [R Admin - The Windows Toolset](https://cran.r-project.org/doc/manuals/R-admin.html#The-Windows-toolset) and **carefully follow each step**. Use the information bellow as an overview not a replacement to the mentioned guide. | |
### Overview ### | |
Download RTools, install for full develoment | |
Install R sources from SVN |