You are previewing JMP 10 Scripting Guide.
O'Reilly logo
JMP 10 Scripting Guide

Book Description

The JMP 10 Scripting Guide provides extensive instructions for using the powerful JMP Scripting Language (JSL). This book begins with an introduction to JSL terminology, examples of how to write your own scripts, and details on script development tools such as the debugger and editor. A description of the language elements follows along with examples of writing JSL scripts to manipulate data tables, platforms, display objects, three-dimensional graphs, and matrices. Learn how to integrate JMP with SAS, R, and Microsoft Excel. Design applications in a drag-and-drop interface called Application Builder, and create add-ins to extend JMP functionality with Add-In Builder. Other topics include examples of scripts for common tasks and a syntax reference, which defines the functions, operators, and messages used in JSL.

Table of Contents

  1. Cover Page
  2. Title Page
  3. Copyright Page
  4. Contents
  5. Learn About JMP
    1. Book Conventions
    2. JMP Documentation
      1. JMP Documentation Suite
      2. JMP Help
      3. JMP Books by Users
      4. JMPer Cable
    3. Additional Resources for Learning JMP
      1. Tutorials
      2. The JMP Starter Window
      3. Sample Data Tables
      4. Learn about Statistical and JSL Terms
      5. Learn JMP Tips and Tricks
      6. Tooltips
      7. Access Resources on the Web
  6. Introduction
    1. What JSL Can Do for You
    2. Help with Learning JSL
      1. The Scripting Guide
      2. The Scripting Index
      3. Let JMP Teach You JSL
    3. Terminology
    4. Basic JSL Syntax
  7. Getting Started
    1. Capturing a Script for an Analysis Report
    2. Capturing a Script for a Data Table
    3. Capturing a Script to Import a File
    4. Gluing Scripts Together
  8. Scripting Tools
    1. Using the Script Editor
      1. Run a Script
      2. Color Coding
      3. Auto Complete Functions
      4. Tooltips
      5. Match Parentheses, Brackets, and Braces
      6. Drag and Drop Text
      7. Find and Replace
      8. Automatic Formatting
      9. Set Preferences for the Script Editor
    2. Working with the Log
      1. Show the Log in the Script Window
      2. Save the Log
    3. Debug Scripts
      1. Debugger Window
      2. Work with Breakpoints
      3. View Variables
      4. Work with Watches
      5. Modify Preferences in Debugger
      6. Persistent Debugger Sessions
      7. Examples of Debugging Scripts
  9. JSL Building Blocks
    1. JSL Syntax Rules
      1. Value Separators
      2. Numbers
      3. Names
      4. Comments
    2. Operators
    3. Global and Local Variables
      1. Show Symbols, Clear Symbols, and Delete Symbols
      2. Lock and Unlock Symbols
    4. Alternatives for Gluing Expressions Together
    5. Iterate
      1. For
      2. While
      3. Summation
      4. Product
      5. Break and Continue
    6. Conditional Functions
      1. If
      2. Match
      3. Choose
      4. Interpolate
      5. Step
    7. Compare Incomplete or Mismatched Data
    8. Inquiry Functions
    9. Name Resolution
      1. Scoping Operators
      2. Frequently Asked Questions
  10. Types of Data
    1. Numbers and Strings
    2. Path Variables
      1. Create and Customize Path Variables
      2. Relative Paths
      3. File Path Separators
    3. Date-Time Functions and Formats
      1. Date-Time Values
      2. Program with Date-Time Functions
      3. Date-Time Values in Data Tables
    4. Currency
    5. Hexadecimal and BLOB Functions
    6. Work with Character Functions
      1. Concat
      2. Munger
      3. Repeat
      4. Sequence
    7. Use Pattern Matching and Regular Expressions
  11. Data Structures
    1. Lists
      1. Evaluate Lists
      2. Assignments with Lists
      3. Perform Operations in Lists
      4. Find the Number of Items in a List
      5. Subscripts
      6. Locate Items in a List
      7. List Operators
      8. Iterate through a List
    2. Matrices
      1. Construct Matrices
      2. Subscripts
      3. Inquiry Functions
      4. Comparisons, Range Checks, and Logical Operators
      5. Numeric Operations
      6. Concatenation
      7. Transpose
      8. Matrices and Data Tables
      9. Matrices and Reports
      10. Loc Functions
      11. Ranking and Sorting
      12. Special Matrices
      13. Inverse Matrices and Linear Systems
      14. Decompositions and Normalizations
      15. Build Your Own Matrix Operators
      16. Statistical Examples
    3. Associative Arrays
      1. Create Associative Arrays
      2. Work with Associative Arrays
      3. Applications for Associative Arrays
      4. Associative Arrays in Graph Theory
      5. Associative Arrays in Set Operations
  12. Programming Methods
    1. Lists and Expressions
      1. Stored expressions
      2. Macros
      3. Manipulating lists
      4. Manipulating expressions
    2. Advanced Scoping and Namespaces
      1. Names Default To Here
      2. Scoped Names
      3. Namespaces
      4. Referencing Namespaces and Scopes
      5. Resolving Named Variable References
      6. Best Practices for Advanced Scripting
    3. Advanced Programming Concepts
      1. Throwing and Catching Exceptions
      2. Functions
      3. Recursion
      4. Includes
      5. Loading and Saving Text Files
    4. Scripting BY Groups
    5. Organize Files into Projects
    6. Encrypt and Decrypt Scripts
      1. Encrypting Scripts in Data Tables
    7. Additional Numeric Operators
      1. Derivatives
      2. Algebraic Manipulations
      3. Maximize and Minimize
    8. Scheduling Actions
    9. Functions that Communicate with Users
      1. Writing to the Log
      2. Send information to the User
  13. Data Tables
    1. Data Table Basics
      1. Getting a Data Table Object
      2. Objects and Messages
    2. Messages for Data Tables
      1. Naming, Saving, and Printing
      2. Subscribing to a Data Table
      3. Journal and Layout
      4. Creating and Deleting Columns
      5. Accessing Values
      6. Summarize
      7. Working with Metadata
      8. Commands from the Rows Menu
      9. Commands from the Tables Menu
    3. Manipulating Columns
      1. Obtaining Column Names
      2. Select Columns
      3. Moving Columns
      4. Data Column Objects
      5. Setting and Getting Attributes
    4. Row State Operators
      1. What are Row States?
      2. An Overview of Row State Operators
      3. Each of the Row State Operators in Detail
      4. Optional: The Numbers Behind Row States
    5. Calculations
      1. Pre-Evaluated Statistics
      2. Calculator Formulas
  14. Scripting Platforms
    1. Overview
    2. Scripting Analysis Platforms
    3. Launching Platforms Interactively and Obtaining the Equivalent Script
      1. Launch a Platform
      2. Save Script
      3. Make Some Changes
      4. Syntax for Platform Scripting
      5. BY Group Reports
      6. Saving BY Group Scripts
    4. Sending Script Commands to a Live Analysis
      1. Conventions for Commands and Arguments
      2. Sending Several Messages
      3. Learning the Messages an Object Responds to
      4. How to Interpret the Listing from Show Properties
    5. Launching Platforms
      1. Specifying Columns
      2. Platform Action Command
      3. Invisible Reports
      4. Titles
    6. General Messages for Platform Windows
      1. Options for All Platforms
    7. Additional Notes
      1. Spline Fits
      2. Fit Model Effects
      3. Fit Model Send Command
      4. DOE Scripting
      5. Scatterplot Scripting
  15. Display Trees
    1. Manipulating Displays
      1. Introduction to Display Boxes
      2. DisplayBox Object References
      3. Sending Messages
      4. Using the << Operator
      5. Platform Example
    2. How to Access Built-in Windows
      1. Using the Pick Windows
    3. Constructing Display Trees
      1. Basics
      2. Updating an Existing Display
      3. Controlling Text Wrap
      4. Interactive Display Elements
      5. Send Messages to Constructed Displays
      6. Build Your Own Displays from Scratch
      7. Construct Display Boxes Containing Platforms
      8. Construct a Custom Platform
      9. Sheets
      10. Journals
      11. Picture Display Type
    4. Modal Windows
      1. Constructing Modal Windows
      2. General-Purpose Modal Window
      3. Data Column Dialog Boxes
      4. Constructing Dialogs and Column Dialogs
    5. Scripting the Script Editor
    6. Syntax Reference
  16. Scripting Graphs
    1. Adding Scripts to Graphs
      1. Ordering Graphics Elements Using JSL
    2. Adding a Legend to a Graph
    3. Creating New Graphs From Scratch
      1. Making Changes to Graphs
    4. Graphing Elements
      1. Plotting Functions
      2. Getting the Properties of a Graphics Frame
      3. Adding a Legend
    5. Drawing Lines, Arrows, Points, and Shapes
      1. Lines
      2. Arrows
      3. Markers
      4. Pies and Arcs
      5. Regular Shapes: Circles, Rectangles, and Ovals
      6. Irregular Shapes: Polygons and Contours
      7. Adding text
      8. Colors
      9. Transparency
      10. Fill patterns
      11. Line types
      12. Drawing With Pixels
    6. Interactive graphs
      1. Handle
      2. MouseTrap
      3. Drag Functions
      4. Troubleshooting
  17. Three-Dimensional Scenes
    1. About JSL 3-D Scenes
    2. JSL 3-D Scene Boxes
    3. Setting the Viewing Space
      1. Setting Up a Perspective Scene
      2. Setting up an Orthographic Scene
    4. Changing the View
      1. The Translate Command
      2. The Rotate Command
      3. The Look At Command
      4. The ArcBall
    5. Graphics Primitives
      1. Primitives Example
      2. Controlling the Appearance of Primitives
      3. Other uses of Begin and End
    6. Drawing Spheres, Cylinders, and Disks
    7. Drawing Text
    8. Using the Matrix Stack
    9. Lighting and Normals
      1. Creating Light Sources
      2. Lighting Models
      3. Normal Vectors
      4. Shading Model
      5. Material Properties
      6. Alpha Blending
      7. Fog
      8. Example
    10. B├ęzier Curves
    11. Using the mouse
    12. Parameters
  18. Extending JMP
    1. Real-Time Data Capture
      1. Create a Datafeed Object
      2. Manage a Datafeed with Messages
    2. Dynamic Link Libraries (DLLs)
    3. Using Sockets in JSL
    4. Database Access
    5. Working with SAS
      1. Make a SAS DATA Step
      2. Create SAS DATA Step Code for Formula Columns
      3. SAS Variable Names
      4. Get the Values of SAS Macro Variables
      5. Connect to a SAS Metadata Server
      6. Preferences
      7. Sample Scripts
    6. Working with R
      1. Installing R
      2. JMP to R Interfaces
      3. R JSL Scriptable Object Interfaces
      4. Conversion Between JMP Data Types and R Data Types
      5. Troubleshooting
      6. Examples
    7. Working with Excel
    8. OLE Automation
      1. Automating JMP through Visual Basic
      2. Automating JMP through Visual C++
  19. Creating and Sharing Applications
    1. Application Builder
      1. Example
      2. Application Builder Terminology
      3. Design an Application
      4. Application Builder Window
      5. Red Triangle Options
      6. Create an Application
      7. Edit or Run an Application
      8. Options for Saving Applications
      9. Additional Example
    2. JMP Add-Ins
      1. Create an Add-In Using Add-In Builder
      2. Edit an Add-In
      3. Remove an Add-In from the Add-Ins Menu
      4. Uninstall an Add-In
      5. Share an Add-In
      6. Register an Add-In Using JSL
      7. Create an Add-In Manually
  20. Common Tasks
    1. Convert Character Dates to Numeric Dates
    2. Format Date/Time Values and Subset Data
    3. Create a Formula Column
    4. Extract Values from an Analysis into a Report
    5. Create an Interactive Program
  21. Index
    1. Symbols
    2. A
    3. B
    4. C
    5. D
    6. E
    7. F
    8. G
    9. H
    10. I
    11. J
    12. K
    13. L
    14. M
    15. N
    16. O
    17. P
    18. Q
    19. R
    20. S
    21. T
    22. U
    23. V
    24. W
    25. X
    26. Y
    27. Z
  22. JSL Syntax Reference
    1. Arithmetic Functions
    2. Assignment Functions
    3. Character Functions
    4. Character Pattern Functions
    5. Comments
    6. Comparison Functions
    7. Conditional and Logical Functions
    8. Constants
    9. Date and Time Functions
    10. Discrete Probability Functions
    11. Display
    12. Financial Functions
    13. Graphic Functions
    14. Matrix Functions
    15. Numeric Functions
    16. Probability Functions
    17. R Integration Functions
    18. Random Functions
    19. Row Functions
    20. Row State Functions
    21. SAS Integration Functions
    22. Statistical Functions
    23. Transcendental Functions
    24. Trigonometric Functions
    25. Utility Functions
    26. Platform Scripting Notes
  23. Messages
    1. Associative Arrays
    2. Data Tables
      1. Columns
      2. Rows
      3. Data Filter
    3. Databases
    4. Datafeed
    5. Display Boxes
    6. Dynamic Link Libraries (DLLs)
    7. Platforms
    8. R Integration Messages
    9. SAS Integration Messages
    10. Messages for Schedule
    11. Sockets
    12. Other Objects
  24. Compatibility Notes
  25. Glossary
  26. Index