<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Windows &amp;gt; JMP &amp;gt; R Integration &amp;gt; R color names to JMP colors? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Windows-gt-JMP-gt-R-Integration-gt-R-color-names-to-JMP-colors/m-p/847379#M102215</link>
    <description>&lt;P&gt;Hi JMP Community,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am currently working on a project based on the output of an R (WGCNA) program that returns cluster identification based on R color definition (see below for examples).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While I can manually retrieve the RGB code for each R color, I am looking for an automated solution to this tedious task. Has anybody&lt;SPAN&gt;&amp;nbsp;automated this process?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;SPAN&gt;Examples of R colors:&lt;/SPAN&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;darkorange&lt;BR /&gt;orange&lt;BR /&gt;darkgrey&lt;BR /&gt;darkturquoise&lt;BR /&gt;darkgreen&lt;BR /&gt;darkred&lt;BR /&gt;royalblue&lt;BR /&gt;lightyellow&lt;BR /&gt;lightgreen&lt;BR /&gt;grey60&lt;BR /&gt;lightcyan&lt;BR /&gt;midnightblue&lt;BR /&gt;cyan&lt;BR /&gt;salmon&lt;BR /&gt;tan&lt;BR /&gt;greenyellow&lt;BR /&gt;purple&lt;BR /&gt;magenta&lt;BR /&gt;pink&lt;BR /&gt;black&lt;BR /&gt;grey&lt;BR /&gt;red&lt;BR /&gt;green&lt;BR /&gt;yellow&lt;BR /&gt;brown&lt;BR /&gt;blue&lt;BR /&gt;turquoise&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;TS&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Mar 2025 18:29:33 GMT</pubDate>
    <dc:creator>Thierry_S</dc:creator>
    <dc:date>2025-03-11T18:29:33Z</dc:date>
    <item>
      <title>Windows &gt; JMP &gt; R Integration &gt; R color names to JMP colors?</title>
      <link>https://community.jmp.com/t5/Discussions/Windows-gt-JMP-gt-R-Integration-gt-R-color-names-to-JMP-colors/m-p/847379#M102215</link>
      <description>&lt;P&gt;Hi JMP Community,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am currently working on a project based on the output of an R (WGCNA) program that returns cluster identification based on R color definition (see below for examples).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While I can manually retrieve the RGB code for each R color, I am looking for an automated solution to this tedious task. Has anybody&lt;SPAN&gt;&amp;nbsp;automated this process?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;SPAN&gt;Examples of R colors:&lt;/SPAN&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;darkorange&lt;BR /&gt;orange&lt;BR /&gt;darkgrey&lt;BR /&gt;darkturquoise&lt;BR /&gt;darkgreen&lt;BR /&gt;darkred&lt;BR /&gt;royalblue&lt;BR /&gt;lightyellow&lt;BR /&gt;lightgreen&lt;BR /&gt;grey60&lt;BR /&gt;lightcyan&lt;BR /&gt;midnightblue&lt;BR /&gt;cyan&lt;BR /&gt;salmon&lt;BR /&gt;tan&lt;BR /&gt;greenyellow&lt;BR /&gt;purple&lt;BR /&gt;magenta&lt;BR /&gt;pink&lt;BR /&gt;black&lt;BR /&gt;grey&lt;BR /&gt;red&lt;BR /&gt;green&lt;BR /&gt;yellow&lt;BR /&gt;brown&lt;BR /&gt;blue&lt;BR /&gt;turquoise&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;TS&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 18:29:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Windows-gt-JMP-gt-R-Integration-gt-R-color-names-to-JMP-colors/m-p/847379#M102215</guid>
      <dc:creator>Thierry_S</dc:creator>
      <dc:date>2025-03-11T18:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Windows &gt; JMP &gt; R Integration &gt; R color names to JMP colors?</title>
      <link>https://community.jmp.com/t5/Discussions/Windows-gt-JMP-gt-R-Integration-gt-R-color-names-to-JMP-colors/m-p/847726#M102265</link>
      <description>&lt;P&gt;&lt;A href="https://r-charts.com/colors/" target="_blank"&gt;https://r-charts.com/colors/&lt;/A&gt;&amp;nbsp;displays the color name and RGB Hex values for R Colors. &amp;nbsp;JMP colors can be made from RGB Values. &amp;nbsp;To me at quick glance the R color names seem to be the same as the X Windows list of color names and values.&amp;nbsp;&lt;A href="https://en.wikipedia.org/wiki/X11_color_names" target="_blank"&gt;https://en.wikipedia.org/wiki/X11_color_names&lt;/A&gt;&amp;nbsp; &amp;nbsp;The R function rib( r, g, b, alpha) returns an R color given an RGBA value on [0,1] . &amp;nbsp;To go the other way use the&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;CODE class="plain"&gt;col2rgb(&lt;/CODE&gt;&lt;CODE class="string"&gt;"peachpuff"&lt;/CODE&gt;&lt;CODE class="plain"&gt;)&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;to returnf the RGB values for the color name Peachpuff. see:&amp;nbsp;&lt;A href="https://www.geeksforgeeks.org/convert-a-color-to-its-rgb-value-in-r-programming-col2rgb-function/" target="_blank"&gt;https://www.geeksforgeeks.org/convert-a-color-to-its-rgb-value-in-r-programming-col2rgb-function/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;rinit();

rsubmit("\[
r &amp;lt;- "red"
values &amp;lt;- col2rgb(r)
]\");
rgb = rget(values);&lt;BR /&gt;show(rgb);&lt;BR /&gt;jmp_c = RGB Color(rgb)
/*:

[255, 0, 0]&amp;nbsp;&lt;BR /&gt;-16711680&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Which is the same return as RGB Color( 1.0, 0,0 0.0 )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2025 16:10:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Windows-gt-JMP-gt-R-Integration-gt-R-color-names-to-JMP-colors/m-p/847726#M102265</guid>
      <dc:creator>Paul_Nelson</dc:creator>
      <dc:date>2025-03-13T16:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: Windows &gt; JMP &gt; R Integration &gt; R color names to JMP colors?</title>
      <link>https://community.jmp.com/t5/Discussions/Windows-gt-JMP-gt-R-Integration-gt-R-color-names-to-JMP-colors/m-p/847933#M102291</link>
      <description>&lt;P&gt;For those using R with JMP, JMP 19 brings a rewrite of the R integration. &amp;nbsp;Please checkout EA-7 and higher. &amp;nbsp;It is still being polished up and finalized. &amp;nbsp;The updated R integration is now built on top of the Python Integration using a &lt;EM&gt;&lt;STRONG&gt;jmpex&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;package supplied as part of our Sample Scripts/Python. &amp;nbsp;This is a pure Python package that utilizes &lt;STRONG&gt;rpy2&amp;nbsp;&lt;/STRONG&gt;package to marshal between JMP, Python, and R. &amp;nbsp;This gives you a familiar API from Python that mimics the JSL interface. &amp;nbsp;The JSL interface now calls through to the &lt;EM&gt;&lt;STRONG&gt;jmpex&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;package. &amp;nbsp;Given that we are publishing the package as a sample, you have the ability to tinker with the code yourself, or just see how it works. &amp;nbsp;If there is something critical that I missed, you have the capability to fix it before we are able to address with another JMP release. &amp;nbsp;The &lt;EM&gt;&lt;STRONG&gt;jmpex&lt;/STRONG&gt;&lt;/EM&gt; package supports both the JSL and Python interfaces. &amp;nbsp;The &lt;STRONG&gt;jmpex&amp;nbsp;&lt;/STRONG&gt;package also&amp;nbsp;serves as an example on creating an installable Python package.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Feedback on bug fixes and enhancements is welcome. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In JMP 18 and earlier, all interaction, every JSL R command caused an interchange file to be written to the filesystem. &amp;nbsp;Which was then accessed by the process calling R. &amp;nbsp;Everything went through the filesystem. &amp;nbsp;Using &lt;STRONG&gt;&lt;EM&gt;rpy2&lt;/EM&gt;&amp;nbsp;&lt;/STRONG&gt;all transfers and interactions now occur in memory. &amp;nbsp;There are some minimal deprecations of the JSL interface due to running one top of the Python Integration, and differences between &lt;EM&gt;&lt;STRONG&gt;rpy2&lt;/STRONG&gt;&lt;/EM&gt; and the previous external process that interacted with R.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The scripting index has been updated in 19 for the JSL functionality and the&lt;EM&gt; &lt;STRONG&gt;jmpex&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;package.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to have R installed and R_HOME environment variable set before installing&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;jmpex&lt;/STRONG&gt;&lt;/EM&gt; or running R Init() the first time. &amp;nbsp;R Init() will automatically make the attempt to install &lt;EM&gt;&lt;STRONG&gt;jmpex&lt;/STRONG&gt;&lt;/EM&gt; from the SAMPLE_SCRIPTS/Python directory if not already installed. &amp;nbsp;Python user's will need to either run R Init() once or use jmputils.jpip() to install the jmpex.zip file.&lt;/P&gt;
&lt;PRE&gt;import jmp
import os
from jmputils import jpip

jpip('install', [ os.path.join(jmp.SAMPLE_SCRIPTS, 'Python', 'jmpex.zip') ] )&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Mar 2025 18:41:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Windows-gt-JMP-gt-R-Integration-gt-R-color-names-to-JMP-colors/m-p/847933#M102291</guid>
      <dc:creator>Paul_Nelson</dc:creator>
      <dc:date>2025-03-14T18:41:44Z</dc:date>
    </item>
  </channel>
</rss>

