<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1" xml:lang="en">
  <title id="py212122">Greenplum Database R Client (Beta)</title>
  <body>
    <p>This chapter contains the following information:</p>
    <ul>
      <li><xref href="#about" type="topic" format="dita"/></li>
      <li><xref href="#supplat" type="topic" format="dita"/></li>
      <li><xref href="#prereqs" type="topic" format="dita"/></li>
      <li><xref href="#install" format="dita"/></li>
      <li><xref href="#exampleds" format="dita"/></li>
      <li><xref href="#use" format="dita"/></li>
      <li><xref href="#limits" format="dita"/></li>
      <li><xref href="#ref" format="dita"/></li>
    </ul>
  </body>
  <topic xml:lang="en" id="about">
    <title>About Greenplum R</title>
    <body>
      <p>The Greenplum R Client (GreenplumR) is an interactive in-database data
        analytics tool for Greenplum Database. The client provides an R interface
        to tables and views, and requires no SQL knowledge to operate on these
        database objects.</p>
      <p>You can use GreenplumR with the Greenplum PL/R procedural language to
        run an R function on data stored in Greenplum Database. GreenplumR parses
        the R function and creates a user-defined function (UDF) for execution in
        Greenplum. Greenplum runs the UDF in parallel on the segment hosts.</p>
      <p>You can similarly use GreenplumR with Greenplum PL/Container 3 (Beta),
        to run an R function against Greenplum data in a high-performance R
        sandbox runtime environment.</p>
      <p>No analytic data is loaded into R when you use GreenplumR, a key
        requirement when dealing with large data sets. Only the R function and
        minimal data is transferred between R and Greenplum.</p>
    </body>
  </topic>
  <topic id="supplat">
    <title>Supported Platforms</title>
    <body>
      <p>GreenplumR supports the following component versions:</p>
      <table>
        <title>GreenplumR Supported Component Versions</title>
        <tgroup cols="5">
          <colspec colnum="1" colname="col1" colwidth="100pt"/>
          <colspec colnum="2" colname="col2" colwidth="100pt"/>
          <colspec colnum="3" colname="col3" colwidth="100pt"/>
          <colspec colnum="4" colname="col5" colwidth="100pt"/>
          <colspec colnum="5" colname="col5" colwidth="100pt"/>
          <thead>
            <row>
              <entry colname="col1">GreenplumR Version</entry>
              <entry colname="col2">R Version</entry>
              <entry colname="col3">Greenplum Version</entry>
              <entry colname="col4">PL/R Version</entry>
              <entry colname="col5">PL/Container Version</entry>
            </row>
          </thead>
          <tbody>
            <row>
              <entry colname="col1">1.0.0 (Beta)</entry>
              <entry colname="col2">3.6+</entry>
              <entry colname="col3">6.1+</entry>
              <entry colname="col4">3.0.2+</entry>
              <entry colname="col5">3.0.0 (Beta)</entry>
            </row>
          </tbody>
        </tgroup>
      </table>
    </body>
  </topic>
  <topic id="prereqs">
    <title>Prerequisites</title>
    <body>
      <p>You can use GreenplumR with Greenplum Database and the PL/R and
        PL/Container procedural languages. Before you install and run GreenplumR
        on a client system:</p>
      <ul>
        <li>Ensure that your Greenplum Database installation is running version
          6.1 or newer.</li>
        <li>Ensure that your client development system has connectivity to the
          Greenplum Database master host.</li>
        <li>Ensure that <codeph>R</codeph> version 3.6.0 or newer is installed on
          your client system, and that you set the <codeph>$R_HOME</codeph>
          environment variable appropriately.</li>
        <li>Determine the procedural language(s) you plan to use with GreenplumR,
          and ensure that the language(s) is installed and configured in your
          Greenplum Database cluster. Refer to
          <xref href="pl_r.xml#topic1" type="topic" format="dita"></xref> and
          <xref href="pl_container.xml#topic1" type="topic" format="dita"></xref>
          (3.0 Beta) for language installation and configuration instructions.</li>
        <li>Verify that you have registered the procedural language(s) in each
          database in which you plan to use GreenplumR to read data from or write
          data to Greenplum. For example, the following command lists the
          extensions and languages registered in the database named
          <codeph>testdb</codeph>:<codeblock>$ psql -h gpmaster -d testdb -c '\dx'
                                     List of installed extensions
    Name     | Version  |   Schema   |                          Description     
                      
-------------+----------+------------+----------------------------------------------------------------
 plcontainer | 1.0.0    | public     | GPDB execution sandboxing for Python and R
 plpgsql     | 1.0      | pg_catalog | PL/pgSQL procedural language
 plr         | 8.3.0.16 | public     | load R interpreter and execute R script from within a database
</codeblock>
          <p>Check for the <codeph>plr</codeph> and/or <codeph>plcontainer</codeph>
            extension <codeph>Name</codeph>.</p></li>
      </ul>
    </body>
  </topic>
  <topic id="install">
    <title>Installing the Greenplum R Client</title>
    <body>
      <p>GreenplumR is an R package. You obtain the package from
        <ph otherprops="oss-only">the GreenplumR <codeph>github</codeph>
        repository</ph> <ph otherprops="pivotal">Pivotal Network</ph> and install
        the package within the R console.</p>
      <ol>
        <li>Download the package from
          <ph otherprops="oss-only">the
            <xref href="https://github.com/greenplum-db/GreenplumR/tarball/master"
              scope="external" format="html">GreenplumR <codeph>github</codeph>
            repository</xref></ph>
          <ph otherprops="pivotal"> the <i>Greenplum Procedural Languages</i>
            filegroup on 
            <xref href="https://network.pivotal.io/products/pivotal-gpdb"
              scope="external" format="html">Pivotal Network</xref></ph>.
          The naming format of the downloaded file is
          <codeph>greenplumR&#8209;&lt;version>&#8209;beta&#8209;gp6.tar.gz</codeph>.
          <p>Note the file system location of the downloaded file.</p></li>
        <li>Install the dependent R packages: <codeph>ini</codeph>,
          <codeph>shiny</codeph>, and <codeph>RPostgreSQL</codeph>. For example,
          enter the R console and run the following, or equivalent, command:
          <codeblock>user@clientsys$ R
> install.packages(c("ini", "shiny", "RPostgreSQL"))</codeblock>
          <p>You may be prompted to select a CRAN download mirror. And, depending
            on your client system configuration, you may be prompted to use or
            create a personal library.</p>
          <p>After downloading, R builds and installs these and dependent
            packages.</p></li>
        <li>Install the GreenplumR R package:<codeblock>> install.packages("/path/to/greenplumR&#8209;&lt;version>&#8209;beta&#8209;gp6.tar.gz", repos = NULL, type = "source")</codeblock></li>
        <li>Install the <codeph>Rdpack</codeph> documentation package:<codeblock>> install.packages("Rdpack")</codeblock></li>
      </ol>
      <p otherprops="oss-only">Alternatively, you can use the R
        <codeph>devtools</codeph> package to install the GreenplumR package
        directly from the <codeph>github</codeph> repository:<codeblock>> devtools::install_github("GreenplumR", "greenplum-db")</codeblock></p>
    </body>
  </topic>
  <topic id="exampleds" xml:lang="en">
    <title>Example Data Sets</title>
    <body>
      <p>GreenplumR includes the <codeph>abalone</codeph> and
        <codeph>null.data</codeph> sample datasets. Refer to the reference pages
        for more information:</p><codeblock>> help( abalone )
> help( null.data )</codeblock>
    </body>
  </topic>
  <topic id="use">
    <title>Using the Greenplum R Client</title><commit_msg>Docs - remove Beta designation from Greenplum R docs<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1" xml:lang="en">
  <title id="py212122">Greenplum Database R Client</title>
  <body>
    <p>This chapter contains the following information:</p>
    <ul>
      <li><xref href="#about" type="topic" format="dita"/></li>
      <li><xref href="#supplat" type="topic" format="dita"/></li>
      <li><xref href="#prereqs" type="topic" format="dita"/></li>
      <li><xref href="#install" format="dita"/></li>
      <li><xref href="#exampleds" format="dita"/></li>
      <li><xref href="#use" format="dita"/></li>
      <li><xref href="#limits" format="dita"/></li>
      <li><xref href="#ref" format="dita"/></li>
    </ul>
  </body>
  <topic xml:lang="en" id="about">
    <title>About Greenplum R</title>
    <body>
      <p>The Greenplum R Client (GreenplumR) is an interactive in-database data
        analytics tool for Greenplum Database. The client provides an R interface
        to tables and views, and requires no SQL knowledge to operate on these
        database objects.</p>
      <p>You can use GreenplumR with the Greenplum PL/R procedural language to
        run an R function on data stored in Greenplum Database. GreenplumR parses
        the R function and creates a user-defined function (UDF) for execution in
        Greenplum. Greenplum runs the UDF in parallel on the segment hosts.</p>
      <p>You can similarly use GreenplumR with Greenplum PL/Container 3 (Beta),
        to run an R function against Greenplum data in a high-performance R
        sandbox runtime environment.</p>
      <p>No analytic data is loaded into R when you use GreenplumR, a key
        requirement when dealing with large data sets. Only the R function and
        minimal data is transferred between R and Greenplum.</p>
    </body>
  </topic>
  <topic id="supplat">
    <title>Supported Platforms</title>
    <body>
      <p>GreenplumR supports the following component versions:</p>
      <table>
        <title>GreenplumR Supported Component Versions</title>
        <tgroup cols="5">
          <colspec colnum="1" colname="col1" colwidth="100pt"/>
          <colspec colnum="2" colname="col2" colwidth="100pt"/>
          <colspec colnum="3" colname="col3" colwidth="100pt"/>
          <colspec colnum="4" colname="col5" colwidth="100pt"/>
          <colspec colnum="5" colname="col5" colwidth="100pt"/>
          <thead>
            <row>
              <entry colname="col1">GreenplumR Version</entry>
              <entry colname="col2">R Version</entry>
              <entry colname="col3">Greenplum Version</entry>
              <entry colname="col4">PL/R Version</entry>
              <entry colname="col5">PL/Container Version</entry>
            </row>
          </thead>
          <tbody>
            <row>
              <entry colname="col1">1.0.0</entry>
              <entry colname="col2">3.6+</entry>
              <entry colname="col3">6.1+</entry>
              <entry colname="col4">3.0.2+</entry>
              <entry colname="col5">3.0.0 (Beta)</entry>
            </row>
          </tbody>
        </tgroup>
      </table>
    </body>
  </topic>
  <topic id="prereqs">
    <title>Prerequisites</title>
    <body>
      <p>You can use GreenplumR with Greenplum Database and the PL/R and
        PL/Container procedural languages. Before you install and run GreenplumR
        on a client system:</p>
      <ul>
        <li>Ensure that your Greenplum Database installation is running version
          6.1 or newer.</li>
        <li>Ensure that your client development system has connectivity to the
          Greenplum Database master host.</li>
        <li>Ensure that <codeph>R</codeph> version 3.6.0 or newer is installed on
          your client system, and that you set the <codeph>$R_HOME</codeph>
          environment variable appropriately.</li>
        <li>Determine the procedural language(s) you plan to use with GreenplumR,
          and ensure that the language(s) is installed and configured in your
          Greenplum Database cluster. Refer to
          <xref href="pl_r.xml#topic1" type="topic" format="dita"></xref> and
          <xref href="pl_container.xml#topic1" type="topic" format="dita"></xref>
          (3.0 Beta) for language installation and configuration instructions.</li>
        <li>Verify that you have registered the procedural language(s) in each
          database in which you plan to use GreenplumR to read data from or write
          data to Greenplum. For example, the following command lists the
          extensions and languages registered in the database named
          <codeph>testdb</codeph>:<codeblock>$ psql -h gpmaster -d testdb -c '\dx'
                                     List of installed extensions
    Name     | Version  |   Schema   |                          Description     
                      
-------------+----------+------------+----------------------------------------------------------------
 plcontainer | 1.0.0    | public     | GPDB execution sandboxing for Python and R
 plpgsql     | 1.0      | pg_catalog | PL/pgSQL procedural language
 plr         | 8.3.0.16 | public     | load R interpreter and execute R script from within a database
</codeblock>
          <p>Check for the <codeph>plr</codeph> and/or <codeph>plcontainer</codeph>
            extension <codeph>Name</codeph>.</p></li>
      </ul>
    </body>
  </topic>
  <topic id="install">
    <title>Installing the Greenplum R Client</title>
    <body>
      <p>GreenplumR is an R package. You obtain the package from
        <ph otherprops="oss-only">the GreenplumR <codeph>github</codeph>
        repository</ph> <ph otherprops="pivotal">Pivotal Network</ph> and install
        the package within the R console.</p>
      <ol>
        <li>Download the package from <ph otherprops="oss-only">the <xref
              href="https://github.com/greenplum-db/GreenplumR/tarball/master" scope="external"
              format="html">GreenplumR <codeph>github</codeph> repository</xref></ph>
          <ph otherprops="pivotal"> the <i>Greenplum Procedural Languages</i> filegroup on <xref
              href="https://network.pivotal.io/products/pivotal-gpdb" scope="external" format="html"
              >Pivotal Network</xref></ph>. The naming format of the downloaded file is
            <codeph>greenplumR&#8209;&lt;version>&#8209;gp6.tar.gz</codeph>. <p>Note the file system
            location of the downloaded file.</p></li>
        <li>Install the dependent R packages: <codeph>ini</codeph>,
          <codeph>shiny</codeph>, and <codeph>RPostgreSQL</codeph>. For example,
          enter the R console and run the following, or equivalent, command:
          <codeblock>user@clientsys$ R
> install.packages(c("ini", "shiny", "RPostgreSQL"))</codeblock>
          <p>You may be prompted to select a CRAN download mirror. And, depending
            on your client system configuration, you may be prompted to use or
            create a personal library.</p>
          <p>After downloading, R builds and installs these and dependent
            packages.</p></li>
        <li>Install the GreenplumR R
          package:<codeblock>> install.packages("/path/to/greenplumR&#8209;&lt;version>&#8209;gp6.tar.gz", repos = NULL, type = "source")</codeblock></li>
        <li>Install the <codeph>Rdpack</codeph> documentation package:<codeblock>> install.packages("Rdpack")</codeblock></li>
      </ol>
      <p otherprops="oss-only">Alternatively, you can use the R
        <codeph>devtools</codeph> package to install the GreenplumR package
        directly from the <codeph>github</codeph> repository:<codeblock>> devtools::install_github("GreenplumR", "greenplum-db")</codeblock></p>
    </body>
  </topic>
  <topic id="exampleds" xml:lang="en">
    <title>Example Data Sets</title>
    <body>
      <p>GreenplumR includes the <codeph>abalone</codeph> and
        <codeph>null.data</codeph> sample datasets. Refer to the reference pages
        for more information:</p><codeblock>> help( abalone )
> help( null.data )</codeblock>
    </body>
  </topic>
  <topic id="use">
    <title>Using the Greenplum R Client</title>
{'fraction_non_alphanumeric': 0.13718389764017141, 'fraction_numerical': 0.012191441849236526, 'mean_word_length': 2.58038029386344, 'pattern_counts': {'":': 0, '<': 441, '<?xml version=': 2, '>': 457, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 12}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2132041', 'n_tokens_mistral': 5006, 'n_tokens_neox': 4879, 'n_words': 1449}