Showing posts with label R (programming language). Show all posts
Showing posts with label R (programming language). Show all posts

Wednesday, October 19, 2016

R (programming language): Help for Datasets Package

Command:

> help(package="datasets")



Result:

                Information on package 'datasets'

Description:

Package:       datasets
Version:       3.3.1
Priority:      base
Title:         The R Datasets Package
Author:        R Core Team and contributors worldwide
Maintainer:    R Core Team <R-core@r-project.org>
Description:   Base R datasets.
License:       Part of R 3.3.1
Built:         R 3.3.1; ; 2016-09-30 00:06:27 UTC; unix

Index:

AirPassengers           Monthly Airline Passenger Numbers 1949-1960
BJsales                 Sales Data with Leading Indicator
BOD                     Biochemical Oxygen Demand
CO2                     Carbon Dioxide Uptake in Grass Plants
ChickWeight             Weight versus age of chicks on different diets
DNase                   Elisa assay of DNase
EuStockMarkets          Daily Closing Prices of Major European Stock
                        Indices, 1991-1998
Formaldehyde            Determination of Formaldehyde
HairEyeColor            Hair and Eye Color of Statistics Students
Harman23.cor            Harman Example 2.3
Harman74.cor            Harman Example 7.4
Indometh                Pharmacokinetics of Indomethacin
InsectSprays            Effectiveness of Insect Sprays
JohnsonJohnson          Quarterly Earnings per Johnson & Johnson Share
LakeHuron               Level of Lake Huron 1875-1972
LifeCycleSavings        Intercountry Life-Cycle Savings Data
Loblolly                Growth of Loblolly pine trees
Nile                    Flow of the River Nile
Orange                  Growth of Orange Trees
OrchardSprays           Potency of Orchard Sprays
PlantGrowth             Results from an Experiment on Plant Growth
Puromycin               Reaction Velocity of an Enzymatic Reaction
Theoph                  Pharmacokinetics of Theophylline
Titanic                 Survival of passengers on the Titanic
ToothGrowth             The Effect of Vitamin C on Tooth Growth in
                        Guinea Pigs
UCBAdmissions           Student Admissions at UC Berkeley
UKDriverDeaths          Road Casualties in Great Britain 1969-84
UKLungDeaths            Monthly Deaths from Lung Diseases in the UK
UKgas                   UK Quarterly Gas Consumption
USAccDeaths             Accidental Deaths in the US 1973-1978
USArrests               Violent Crime Rates by US State
USJudgeRatings          Lawyers' Ratings of State Judges in the US
                        Superior Court
USPersonalExpenditure   Personal Expenditure Data
VADeaths                Death Rates in Virginia (1940)
WWWusage                Internet Usage per Minute
WorldPhones             The World's Telephones
ability.cov             Ability and Intelligence Tests
airmiles                Passenger Miles on Commercial US Airlines,
                        1937-1960
airquality              New York Air Quality Measurements
anscombe                Anscombe's Quartet of 'Identical' Simple Linear
                        Regressions
attenu                  The Joyner-Boore Attenuation Data
attitude                The Chatterjee-Price Attitude Data
austres                 Quarterly Time Series of the Number of
                        Australian Residents
beavers                 Body Temperature Series of Two Beavers
cars                    Speed and Stopping Distances of Cars
chickwts                Chicken Weights by Feed Type
co2                     Mauna Loa Atmospheric CO2 Concentration
crimtab                 Student's 3000 Criminals Data
datasets-package        The R Datasets Package
discoveries             Yearly Numbers of Important Discoveries
esoph                   Smoking, Alcohol and (O)esophageal Cancer
euro                    Conversion Rates of Euro Currencies
eurodist                Distances Between European Cities and Between
                        US Cities
faithful                Old Faithful Geyser Data
freeny                  Freeny's Revenue Data
infert                  Infertility after Spontaneous and Induced
                        Abortion
iris                    Edgar Anderson's Iris Data
islands                 Areas of the World's Major Landmasses
lh                      Luteinizing Hormone in Blood Samples
longley                 Longley's Economic Regression Data
lynx                    Annual Canadian Lynx trappings 1821-1934
morley                  Michelson Speed of Light Data
mtcars                  Motor Trend Car Road Tests
nhtemp                  Average Yearly Temperatures in New Haven
nottem                  Average Monthly Temperatures at Nottingham,
                        1920-1939
npk                     Classical N, P, K Factorial Experiment
occupationalStatus      Occupational Status of Fathers and their Sons
precip                  Annual Precipitation in US Cities
presidents              Quarterly Approval Ratings of US Presidents
pressure                Vapor Pressure of Mercury as a Function of
                        Temperature
quakes                  Locations of Earthquakes off Fiji
randu                   Random Numbers from Congruential Generator
                        RANDU
rivers                  Lengths of Major North American Rivers
rock                    Measurements on Petroleum Rock Samples
sleep                   Student's Sleep Data
stackloss               Brownlee's Stack Loss Plant Data
state                   US State Facts and Figures
sunspot.month           Monthly Sunspot Data, from 1749 to "Present"
sunspot.year            Yearly Sunspot Data, 1700-1988
sunspots                Monthly Sunspot Numbers, 1749-1983
swiss                   Swiss Fertility and Socioeconomic Indicators
                        (1888) Data
treering                Yearly Treering Data, -6000-1979
trees                   Girth, Height and Volume for Black Cherry Trees
uspop                   Populations Recorded by the US Census
volcano                 Topographic Information on Auckland's Maunga
                        Whau Volcano
warpbreaks              The Number of Breaks in Yarn during Weaving
women                   Average Heights and Weights for American Women

R (programming language): 3D Scatter Plot Example

Command:

> library(scatterplot3d)


Result:

 library(scatterplot3d) でエラー:
   ‘scatterplot3d’ という名前のパッケージはありません


Command:

> install.packages("scatterplot3d")


Result:

 パッケージを ‘/usr/local/lib/R/3.3/site-library’ 中にインストールします
 (‘lib’ が指定されていないため)
 --- このセッションで使うために、CRAN のミラーサイトを選んでください ---
HTTPS CRAN mirror

 1: 0-Cloud [https]                 2: Algeria [https]            
 3: Australia (Melbourne) [https]   4: Australia (Perth) [https]  
 5: Austria [https]                 6: Belgium (Ghent) [https]    
 7: Brazil (RJ) [https]             8: Brazil (SP 1) [https]      
 9: Bulgaria [https]               10: Canada (MB) [https]        
11: Chile [https]                  12: China (Beijing) [https]    
13: China (Hefei) [https]          14: Colombia (Cali) [https]    
15: Czech Republic [https]         16: Denmark [https]            
17: France (Lyon 1) [https]        18: France (Lyon 2) [https]    
19: France (Marseille) [https]     20: France (Montpellier) [https]
21: France (Paris 2) [https]       22: Germany (Falkenstein) [https]
23: Germany (Münster) [https]      24: Iceland [https]            
25: India [https]                  26: Ireland [https]            
27: Italy (Padua) [https]          28: Japan (Tokyo) [https]      
29: Malaysia [https]               30: Mexico (Mexico City) [https]
31: New Zealand [https]            32: Norway [https]              
33: Philippines [https]            34: Russia (Moscow) [https]    
35: Serbia [https]                 36: Spain (A Coruña) [https]    
37: Spain (Madrid) [https]         38: Switzerland [https]        
39: Taiwan (Chungli) [https]       40: Turkey (Denizli) [https]    
41: UK (Bristol) [https]           42: UK (Cambridge) [https]      
43: UK (London 1) [https]          44: USA (CA 1) [https]          
45: USA (IA) [https]               46: USA (KS) [https]            
47: USA (MI 1) [https]             48: USA (TN) [https]            
49: USA (TX) [https]               50: USA (WA) [https]            
51: (HTTP mirrors)                

Selection:


Entered value:

28


Result:

 URL 'https://cran.ism.ac.jp/src/contrib/scatterplot3d_0.3-37.tar.gz' を試しています
Content type 'application/x-gzip' length 585767 bytes (572 KB)
==================================================
downloaded 572 KB

 起動準備中です -  警告メッセージ:
1: Setting LC_TIME failed, using "C"
2: Setting LC_MESSAGES failed, using "C"
3: Setting LC_MONETARY failed, using "C"
* installing *source* package ‘scatterplot3d’ ...
**  パッケージ ‘scatterplot3d’ の解凍および MD5 サムの検証に成功しました
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
 起動準備中です -  警告メッセージ:
1: Setting LC_TIME failed, using "C"
2: Setting LC_MESSAGES failed, using "C"
3: Setting LC_MONETARY failed, using "C"
* DONE (scatterplot3d)

 ダウンロードされたパッケージは、以下にあります
  ‘/private/var/folders/hh/0h10rfgn6vx07dqp8b7lv1700000gn/T/RtmpJRyDyQ/downloaded_packages’


Command:

> library(scatterplot3d)
> attach(mtcars)
> scatterplot3d(wt,disp,mpg,main="3D Scatterplot")


Result:

R 3D Scatter Plot

Command:

> wt


Result:

 [1] 2.620 2.875 2.320 3.215 3.440 3.460 3.570 3.190 3.150 3.440 3.440 4.070
[13] 3.730 3.780 5.250 5.424 5.345 2.200 1.615 1.835 2.465 3.520 3.435 3.840
[25] 3.845 1.935 2.140 1.513 3.170 2.770 3.570 2.780


Command:

> disp


Result:

 [1] 160.0 160.0 108.0 258.0 360.0 225.0 360.0 146.7 140.8 167.6 167.6 275.8
[13] 275.8 275.8 472.0 460.0 440.0  78.7  75.7  71.1 120.1 318.0 304.0 350.0
[25] 400.0  79.0 120.3  95.1 351.0 145.0 301.0 121.0


Command:

> mpg


Result:

 [1] 21.0 21.0 22.8 21.4 18.7 18.1 14.3 24.4 22.8 19.2 17.8 16.4 17.3 15.2 10.4
[16] 10.4 14.7 32.4 30.4 33.9 21.5 15.5 15.2 13.3 19.2 27.3 26.0 30.4 15.8 19.7
[31] 15.0 21.4

macOS Sierra: R (programming language): Scatter Plot Example

Command:

$ r


Result:

R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin16.0.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

During startup - Warning messages:
1: Setting LC_COLLATE failed, using "C"
2: Setting LC_TIME failed, using "C"
3: Setting LC_MESSAGES failed, using "C"
4: Setting LC_MONETARY failed, using "C"


Command:

> cars <-c(1,3,6,4,9)
> plot(cars)


Result:

R (programming language) Plot

macOS Sierra: R (programming language): Installation

Command:

$ brew tap homebrew/science


Result:

==> Auto-updated Homebrew!
Updated Homebrew from 41b2df8 to 9f76e2b.
Updated 3 taps (homebrew/core, homebrew/python, homebrew/science).
==> New Formulae
amqp-cpp                   git-series                 homebrew/science/soplex    nvc                        sonar-scanner              typescript
archi-steam-farm           hana                       homebrew/science/tagdust   osrm-backend               sql-translator             yarn
armor                      hesiod                     hostess                    piknik                     sqldiff
borg                       homebrew/science/gatk      kube-aws                   pyinvoke                   svgcleaner
consul-backinator          homebrew/science/kaiju     libsquish                  questdb                    termbox
csvtomd                    homebrew/science/libbi     modd                       ripgrep                    terragrunt
dbhash                     homebrew/science/mothur    nmh                        rmlint                     ttyd
==> Updated Formulae
abi-compliance-checker                  gdal                                    jsonpp                                  plantuml
ace                                     gdb                                     kapacitor                               pngcrush
afl-fuzz                                gdk-pixbuf                              kerl                                    ponyc
aha                                     geckodriver                             khal                                    poppler
algernon                                gedit                                   khard                                   postgis
allegro                                 ghex                                    kitchen-sync                            profanity
ammonite-repl                           git ✔                                   knot                                    progress
android-ndk                             git-archive-all                         kobalt                                  proj
anjuta                                  git-credential-manager                  kubernetes-cli                          prometheus
ansible                                 git-extras                              latex2html                              protobuf-swift
ansible-cmdb                            git-lfs                                 ldc                                     purescript
antigen                                 gitbucket                               ldns                                    pyqt5
apache-flink                            gjs                                     ledger                                  python ✔
apache-spark                            glib                                    libass                                  python3 ✔
aqbanking                               glibmm                                  libgaiagraphics                         qca
aria2                                   glide                                   libgee                                  qjackctl
artifactory                             glm                                     libgeotiff                              qscintilla2
asciinema2gif                           gnome-builder                           libgit2                                 qt5
aubio                                   gnome-icon-theme                        libiscsi                                re2
autojump                                gnome-themes-standard                   libjson-rpc-cpp                         remctl
avro-c                                  gnumeric                                liblwgeom                               repo
aws-elasticbeanstalk                    gnuplot                                 libmongoclient                          riemann-client
aws-sdk-cpp                             gnutls                                  libnfs                                  rocksdb
awscli                                  gobject-introspection                   libnotify                               rolldice
azure-cli                               gofabric8                               libosinfo                               roswell
bash-git-prompt                         goffice                                 libphonenumber                          rswift
bazel                                   googler ✔                               libpointing                             rtv
bear                                    gprof2dot                               librasterlite                           ruby
bgpq3                                   grib-api                                libsigc++                               rush
bind                                    gsettings-desktop-schemas               libspatialite                           s-search
binwalk                                 gssdp                                   libtorrent-rasterbar                    sbcl
bitrise                                 gstreamermm                             libvirt                                 sflowtool
boost                                   gtk+3                                   libxmp                                  shadowsocks-libev
boost-bcp                               gtkextra                                liquibase                               shared-mime-info
boost-python                            gtkmm3                                  llnode                                  shyaml
bsdconv                                 gucharmap                               logtalk                                 sonarqube
caddy                                   gupnp                                   luaradio                                source-highlight
caf                                     gupnp-av                                macvim ✔                                spatialite-gui
cake                                    gwyddion                                mailhog                                 spatialite-tools
calabash                                gx                                      mapnik                                  sqlite ✔
carthage                                gx-go                                   mapserver                               sqlite-analyzer
castxml                                 homebrew/python/numpy ✔                 mariadb                                 sqlmap
cayley                                  homebrew/python/scipy                   media-info                              ssdb
cern-ndiff                              homebrew/science/adol-c                 mediaconch                              sslyze
certbot                                 homebrew/science/beast                  mercurial ✔                             svtplay-dl
chaiscript                              homebrew/science/blis                   meson                                   syncthing
chapel                                  homebrew/science/boost-compute          metabase                                sysdig
checkstyle                              homebrew/science/cantera                metaproxy                               tailor
cjdns                                   homebrew/science/dealii                 metashell                               tcpkali
clearlooks-phenix                       homebrew/science/diamond                mg3a                                    telegraf
clutter-gtk                             homebrew/science/elemental              micro                                   terminal-notifier
codequery                               homebrew/science/getdp                  micropython                             terraform
collectd                                homebrew/science/gmsh                   midnight-commander                      texmath
commandbox                              homebrew/science/gmt4                   mitmproxy                               tile38
conan                                   homebrew/science/idba                   mkvtoolnix                              tippecanoe
cppcheck                                homebrew/science/igv                    mlogger                                 titan-server
cromwell                                homebrew/science/insighttoolkit         mogenerator                             tmux
crystal-lang                            homebrew/science/kent-tools             mongodb                                 tomcat
cucumber-cpp                            homebrew/science/lammps                 mongoose                                tor
dar                                     homebrew/science/lightstringgraph       monkeysphere                            uhd
dbus                                    homebrew/science/mbsystem               mutt                                    unbound
dcmtk                                   homebrew/science/mhap                   mypy                                    uwsgi
deheader                                homebrew/science/nextflow               mysql                                   vala
diff-pdf                                homebrew/science/nixio                  natalie                                 valabind
digdag                                  homebrew/science/oce                    ncmpcpp                                 vapoursynth
djview4                                 homebrew/science/petsc                  neofetch                                vault
docker                                  homebrew/science/scotch                 nettle                                  vdirsyncer
doctl                                   homebrew/science/slepc                  nexus                                   verilator
dspdfviewer                             homebrew/science/sratoolkit             nim                                     vim ✔
dvm                                     homebrew/science/sundials               nmap ✔                                  voltdb
efl                                     homebrew/science/tmv-cpp                node                                    vultr
eigen ✔                                 homebrew/science/trilinos               node-build                              wgetpaste
elasticsearch                           homebrew/science/vips                   noti                                    wimlib
elixir                                  homebrew/science/vsearch                notmuch                                 wine
elixirscript                            homebrew/science/vtk                    offlineimap                             winetricks
evince                                  hub                                     oniguruma                               x265
fabio                                   hugo ✔                                  open-babel                              xcenv
fastd                                   i2p                                     openconnect                             xonsh
fdupes                                  ice                                     opencsg                                 yank
ffmpeg                                  imagemagick                             openhmd                                 yaz
file-roller                             imapsync                                osm2pgsql                               yazpp
flow                                    influxdb                                osquery                                 you-get
folly                                   irrlicht                                oysttyer                                youtube-dl
fontforge                               jack                                    p11-kit                                 zile
fonttools                               jansson                                 pazpar2                                 zimg
format-udf                              jbake                                   pcap_dnsproxy                           zplug
freeipmi                                jboss-forge                             pdal                                    zsh-autosuggestions
freeling                                jemalloc                                pdf2htmlex                              zsh-completions
freeradius-server                       jenkins                                 pdftoedn                                zsh-navigation-tools
freetds                                 jfrog-cli-go                            peco                                    zstd
fzf                                     jsdoc3                                  pgroonga
gammaray                                jsoncpp                                 pgrouting
gauge                                   jsonnet                                 picocom
==> Deleted Formulae
automoc4                   elementary                 frescobaldi                libmarisa                  qwtpolar                   sqliteman
cuty_capt                  evas-generic-loaders       jless                      pyside                     rcssserver                 valkyrie
dwarf                      ezlupdate                  jsdoc-toolkit              pyside-tools               shiboken


Command:

$ brew install r


Result:

==> Installing r from homebrew/science
==> Installing dependencies for homebrew/science/r: mpfr, readline, gettext, pcre, fontconfig, pixman, libffi, glib, cairo
==> Installing homebrew/science/r dependency: mpfr
==> Downloading https://homebrew.bintray.com/bottles/mpfr-3.1.5.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring mpfr-3.1.5.sierra.bottle.tar.gz
🍺  /usr/local/Cellar/mpfr/3.1.5: 25 files, 3.6M
==> Installing homebrew/science/r dependency: readline
==> Downloading https://homebrew.bintray.com/bottles/readline-7.0.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring readline-7.0.sierra.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.

macOS provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only.


Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/readline/lib
    CPPFLAGS: -I/usr/local/opt/readline/include

==> Summary
🍺  /usr/local/Cellar/readline/7.0: 45 files, 2M
==> Installing homebrew/science/r dependency: gettext
==> Downloading https://homebrew.bintray.com/bottles/gettext-0.19.8.1.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring gettext-0.19.8.1.sierra.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.

macOS provides the BSD gettext library and some software gets confused if both are in the library path.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/gettext/lib
    CPPFLAGS: -I/usr/local/opt/gettext/include

==> Summary
🍺  /usr/local/Cellar/gettext/0.19.8.1: 1,934 files, 16.9M
==> Installing homebrew/science/r dependency: pcre
==> Downloading https://homebrew.bintray.com/bottles/pcre-8.39.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring pcre-8.39.sierra.bottle.tar.gz
🍺  /usr/local/Cellar/pcre/8.39: 203 files, 5.4M
==> Installing homebrew/science/r dependency: fontconfig
==> Downloading https://homebrew.bintray.com/bottles/fontconfig-2.12.1_2.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring fontconfig-2.12.1_2.sierra.bottle.tar.gz
==> Using the sandbox
==> Regenerating font cache, this may take a while
==> /usr/local/Cellar/fontconfig/2.12.1_2/bin/fc-cache -frv
🍺  /usr/local/Cellar/fontconfig/2.12.1_2: 468 files, 3M
==> Installing homebrew/science/r dependency: pixman
==> Downloading https://homebrew.bintray.com/bottles/pixman-0.34.0.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring pixman-0.34.0.sierra.bottle.tar.gz
🍺  /usr/local/Cellar/pixman/0.34.0: 12 files, 1.2M
==> Installing homebrew/science/r dependency: libffi
==> Downloading https://homebrew.bintray.com/bottles/libffi-3.0.13.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libffi-3.0.13.sierra.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.

Some formulae require a newer version of libffi.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/libffi/lib
    PKG_CONFIG_PATH: /usr/local/opt/libffi/lib/pkgconfig

==> Summary
🍺  /usr/local/Cellar/libffi/3.0.13: 15 files, 361.8K
==> Installing homebrew/science/r dependency: glib
==> Downloading https://homebrew.bintray.com/bottles/glib-2.50.1.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring glib-2.50.1.sierra.bottle.tar.gz
🍺  /usr/local/Cellar/glib/2.50.1: 427 files, 22.3M
==> Installing homebrew/science/r dependency: cairo
==> Downloading https://homebrew.bintray.com/bottles/cairo-1.14.6_1.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring cairo-1.14.6_1.sierra.bottle.tar.gz
🍺  /usr/local/Cellar/cairo/1.14.6_1: 118 files, 5.9M
==> Installing homebrew/science/r
==> Downloading https://homebrew.bintray.com/bottles-science/r-3.3.1_3.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring r-3.3.1_3.sierra.bottle.tar.gz
 起動準備中です -  警告メッセージ:
1: Setting LC_COLLATE failed, using "C"
2: Setting LC_TIME failed, using "C"
3: Setting LC_MESSAGES failed, using "C"
4: Setting LC_MONETARY failed, using "C"
 起動準備中です -  警告メッセージ:
1: Setting LC_COLLATE failed, using "C"
2: Setting LC_TIME failed, using "C"
3: Setting LC_MESSAGES failed, using "C"
4: Setting LC_MONETARY failed, using "C"
==> Caveats
To enable rJava support, run the following command:
  R CMD javareconf JAVA_CPPFLAGS=-I/System/Library/Frameworks/JavaVM.framework/Headers
If you've installed a version of Java other than the default, you might need to instead use:
  R CMD javareconf JAVA_CPPFLAGS="-I/System/Library/Frameworks/JavaVM.framework/Headers -I/Library/Java/JavaVirtualMachines/jdk<version>.jdk/"
(where <version> can be found by running `java -version`, `/usr/libexec/java_home`, or `locate jni.h`), or:
  R CMD javareconf JAVA_CPPFLAGS="-I/System/Library/Frameworks/JavaVM.framework/Headers -I$(/usr/libexec/java_home | grep -o '.*jdk')"
==> Summary
🍺  /usr/local/Cellar/r/3.3.1_3: 2,204 files, 54.7M


Command:

$ r --version


Result:

R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin16.0.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
http://www.gnu.org/licenses/.