14.03.2014 Views

Using JMP - SAS

Using JMP - SAS

Using JMP - SAS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix B Formula Functions Reference 405<br />

Character Functions<br />

If you include a second argument, any and all characters in that argument are taken to be delimiters. For<br />

example, Words("Doe, Jane P.",", .") returns {"Doe","Jane","P"}.<br />

To insert the delimiters argument, click on any argument in the Words function and then click the insert<br />

button on the Formula Editor keypad. Use the delete key on your keyboard or the delete button on<br />

the Formula Editor keypad to remove the delimiters argument. If you do not specify a delimiter, white space<br />

is used as the delimiter. If you define the delimiter as an empty string, each character is treated as a separate<br />

word.<br />

Left, Right<br />

Returns a substring of the left-most or right-most n characters of the string text, respectively. Both functions<br />

also work with lists.<br />

Starts With, Ends With<br />

Returns 1 if whole begins or ends with part, respectively. Returns 0 otherwise. Both functions also work with<br />

lists.<br />

Item<br />

Is different than the Word function because of the way it treats word delimiters. If a delimiter is found<br />

multiple times, or you enter a delimiter with multiple characters, the Word function treats them as a single<br />

delimiter. The Item function uses each delimiter to define a new word position. To compare, suppose a<br />

name is of the form lastname, firstname. The delimiter is a comma followed by a blank, such as:<br />

Item(2, "Layman, Veronica", ", ")<br />

Word(2, "Layman, Veronica", ", ")<br />

The Item function returns a missing value because it treats the comma and blank separately and finds<br />

nothing between them. The Word function treats the comma and blank as a single delimiter and finds<br />

Veronica as the second word.<br />

If you do not specify a delimiter, white space (blank space) is used as the delimiter. If you define the<br />

delimiter as an empty string, each character is treated as a separate item.<br />

Char to Hex, Hex, Hex to Char, Hex to Number<br />

Converts between Hex and other formats.<br />

Hex returns the hexadecimal representation of its argument. If the argument is character (in quotes), then<br />

the result is a character string twice as long containing the hexadecimal codes for the character values. For<br />

example, Hex("A") returns the string 41.<br />

If the argument is numeric and “integer” is specified, the Hex function returns an 8-hexadecimal-character<br />

representation of the integer returned. For example, Hex(12, “integer”) returns the string 0000000C.<br />

Hex to Char converts hexadecimals to characters. The resulting character string might not be valid display<br />

characters. All the characters must be in pairs, in the ranges 0-9,A-Z, and a-z. Blanks and commas are<br />

allowed and skipped.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!