<commit_before>H2O in R
------------


These instructions assume you are using R 2.13.0 or later.  

**STEP 1**

The download package can be obtained by clicking on the button **Download H2O** at `http://0xdata.com/h2o <http://0xdata.com/h2o>`_.

Unzip the downloaded h2o zip file

**STEP 2**

Start an instance of H2O. If you have questions about how to do this see the notes provided at the bottom of the page for staring from a zip file. 

*Users should be aware that in order for H2O to successfully run through R, an instance of H2O must also simultaneously be running. If the instance of H2O is stopped, the R program will no longer run, and work done will be lost.* 

**STEP 3: Console Users**

In the R console install the package by entering the following command at the prompt:

  >install.packages("<unzipped h2o directory>/R/h2oWrapper_1.0.tar.gz", repos = NULL, type = "source")
  

This returns output similar to the following:



   * installing *source* package ‘h2oWrapper’ ...
   ** R
   ** preparing package for lazy loading
   ** help
   *** installing help indices
   ** building package indices
   ** testing if installed package can be loaded
   * DONE (h2oWrapper)

**STEP 3: R Studio Users** 

R Studio users can find information on running H2O through R studio by going to 
http://docs.0xdata.com/Ruser/Rwrapper.html and looking for the section for RStudio



**STEP 4** 



  >library(h2oWrapper)

**STEP 5**

Install dependencies for the R package by calling 


  >h2oWrapper.installDepPkgs()

Which returns


  Loading required package: bitops
  Loading required package: MASS
  Loading required package: cluster
  Loading required package: mclust
  Package 'mclust' version 4.2
  Loading required package: flexmix
  Loading required package: lattice
  


**STEP 6**


  >localH2O = h2oWrapper.init(ip = "localhost", port = 54321, startH2O = TRUE, silentUpgrade = FALSE, promptUpgrade = TRUE)



**STEP 7** 

Here is an example of using the above object in an H2O call in R



  >irisPath = system.file("extdata", "iris.csv", package="h2o")
  
  >iris.hex = h2o.importFile(localH2O, path = irisPath, key = "iris.hex")
  >summary(iris.hex)





Getting started from a zip file
-------------------------------


""""""""""""""""""
1. Download the latest release of H2O as a .zip file from `the H2O website <http://0xdata.com/h2O/>`_.

2. From your terminal change your working directory to the same directory where your .zip file is saved.

3. From your terminal, unzip the .zip file.  For example:

<commit_msg>changed rev suppored in R, minor format changes to readme<commit_after>H2O in R
------------


These instructions assume you are using R 2.15.0 or later.  

**STEP 1**

The download package can be obtained by clicking on the button "Download H2O" at http://0xdata.com/h2o <http://0xdata.com/h2o.

Unzip the downloaded h2o zip file

**STEP 2**

Start an instance of H2O. If you have questions about how to do this see the notes provided at the bottom of the page for staring from a zip file. 

*Users should be aware that in order for H2O to successfully run through R, an instance of H2O must also simultaneously be running. If the instance of H2O is stopped, the R program will no longer run, and work done will be lost.* 

**STEP 3: Console Users**

In the R console install the package by entering the following command at the prompt:

  >install.packages("<unzipped h2o directory>/R/h2oWrapper_1.0.tar.gz", repos = NULL, type = "source")
  

This returns output similar to the following:



   * installing *source* package ‘h2oWrapper’ ...
   ** R
   ** preparing package for lazy loading
   ** help
   *** installing help indices
   ** building package indices
   ** testing if installed package can be loaded
   * DONE (h2oWrapper)

**STEP 3: R Studio Users** 

R Studio users can find information on running H2O through R studio by going to 
http://docs.0xdata.com/Ruser/Rwrapper.html and looking for the section for RStudio



**STEP 4** 



  >library(h2oWrapper)

**STEP 5**

Install dependencies for the R package by calling 


  >h2oWrapper.installDepPkgs()

Which returns


  Loading required package: bitops
  Loading required package: MASS
  Loading required package: cluster
  Loading required package: mclust
  Package 'mclust' version 4.2
  Loading required package: flexmix
  Loading required package: lattice
  


**STEP 6**


  >localH2O = h2oWrapper.init(ip = "localhost", port = 54321, startH2O = TRUE, silentUpgrade = FALSE, promptUpgrade = TRUE)



**STEP 7** 

Here is an example of using the above object in an H2O call in R



  >irisPath = system.file("extdata", "iris.csv", package="h2o")
  
  >iris.hex = h2o.importFile(localH2O, path = irisPath, key = "iris.hex")
  >summary(iris.hex)





Getting started from a zip file
-------------------------------


1. Download the latest release of H2O as a .zip file from the H2O website http://0xdata.com/h2O/.

2. From your terminal change your working directory to the same directory where your .zip file is saved.

3. From your terminal, unzip the .zip file.  For example:

{'fraction_non_alphanumeric': 0.09978393242977804, 'fraction_numerical': 0.02121390689451974, 'mean_word_length': 3.374570446735395, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6905190', 'n_tokens_mistral': 1641, 'n_tokens_neox': 1523, 'n_words': 677}