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 403<br />

Character Functions<br />

Concat ||<br />

Concatenates character strings to produce a new string with the function’s second character argument<br />

appended to the first. For example, "Dr." || " " || name produces a new string consisting of the title Dr.<br />

followed by a space and the contents of the name string. (See also “Concat Items” on page 406.)<br />

Contains<br />

Returns the numeric position within the first argument of the first instance of the second argument, if it<br />

exists. The second argument can contain one ore more characters. If the second argument does not exist,<br />

Contains returns a zero. For example, Contains("Veronica Layman", "ay") evaluates as 11. Contains("Lillie<br />

Layman", "L") evaluates as 1. The third argument is optional and is a numeric value that specifies the<br />

starting position. If offset is negative, Contains searches backward from offset from the end of the string.<br />

Munger<br />

Computes new character strings from existing strings by inserting or deleting characters. It can also produce<br />

substrings, calculate indices, and perform other tasks depending on how you specify its arguments. The<br />

Munger function treats uppercase and lowercase letters as different characters.<br />

Text is a character expression. Munger applies the other three arguments to this string to compute a result.<br />

Offset is a numeric expression indicating the starting position to search in the string. If Offset is greater than<br />

the position of the first instance of the find argument, the first instance is disregarded.<br />

Find/Length is a character or numeric expression. Use a character string as search criterion, or use a positive<br />

integer to return that number of consecutive characters starting from the Offset position. If you specify a<br />

negative integer as the Length value, Munger returns all characters from the Offset through to the end of<br />

the string.<br />

Replace (optional argument) can be a string or unspecified. If it is a string and the Find/Offset value is<br />

numeric, Munger replaces the search criterion with the Replace string to form the result. If the Find/Offset<br />

value is numeric and no string is specified, Munger calculates a substring. If the Find/Length value is a<br />

character string, Munger always returns the numeric offset, disregarding the Replace value if it exists. To<br />

insert the Replace argument, click any argument in the Munger function and then click the insert button.<br />

Use the delete key on your keyboard or the delete button ( ) on the Formula Editor keypad to remove the<br />

Replace argument.<br />

Lowercase, Uppercase<br />

The Lowercase function converts any uppercase character found in its argument to the equivalent<br />

lowercase character. For example, Lowercase("VERONICA LAYMAN") evaluates as veronica layman. The<br />

Uppercase function converts any lowercase character found in its argument to the equivalent uppercase<br />

character. For example, Uppercase("Veronica Layman") evaluates as VERONICA LAYMAN.<br />

Length<br />

Calculates the length of its argument. For example, Length("Veronica") evaluates as 8. If the argument is<br />

• a string, length returns the number of characters;

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

Saved successfully!

Ooh no, something went wrong!