In this post I take a look at how JSL can be used to perform string manipulation.
Tag Archives: JSL
Transparency
Here’s a handy little function to apply a transparency effect to a solid (r,g,b) colour:
1 2 3 4 5 6 7 8 |
TransparentRGB = function({r,g,b,opacity=0.65},{default local}, red = opacity*r + (1-opacity); green = opacity*g + (1-opacity); blue = opacity*b + (1-opacity); return(RGBColor(red,green,blue)); ); |
File Handling
The JMP scripting language has a number of convenient functions for handling files external to JMP. Here’s an example:
1 2 3 4 5 6 7 8 |
// purge the temporary folder files = filesIndirectory(tmpDir); for (i=1,i<=nItems(files),i++, path = convertFilePath(files[i],base(tmpDir)); if (!isDirectory(path), deleteFile(path) ) ); |
Handling Column References
JSL is often described as a scripting language. Personally I think that doesn’t do it justice. I prefer to think of it as a programming language. The difference? For me an obvious difference is that instead of using hard-coded values I want to use variables. In particular I want to use variables to handle column references.
Segmented Regression
I’m sure there is a more technically correct term for this: I use the phrase segmented regression to describe the process whereby I select a segment of data within a curve and build a regression model for just that segment.

I have some code to aid the process. The code illustrates how to perform regression on-the-fly as well as how to utilise the MouseTrap function to handle mouse movement events.
Web Scraping TripAdvisor
Since writing this post I have placed the associated code on the
JMP File Exchange …
The problem with the internet is that it gives you too much information, or rather, it takes too long to gather the information. I often cross reference hotel booking sites with TripAdvisor, and its a laborious process. So this evening I decided to streamline my process by writing a script to gather to user reviews into a JMP table and simple report.
Real-Time Data Capture
JMP is brilliant for real-time data capture. Add to that the ability to use JSL to construct “industrial” style user-interfaces and its easy to get JMP deployed in an environment that relies on simple to use robust data capture from online measurement systems.
Get Excel Worksheets
Version 13 of JMP introduces a new function: Get Excel Worksheets.
(more…)
Pick Directory
This is one of a series of posts highlighting new features available in version 13 of JMP.
Pick Directory is a JSL function that is used to allow the user to select a directory on the computer. Sometimes you don’t know where to look for data, or where to save data, so you ask the user using this function.
(more…)