R.IsValidIdentifier

Prototypes

static boolean IsValidIdentifier( String sRVarName )

Return Value

If the string sRVarName conforms to the rules for R identifiers, the return value is true. Otherwise, the return value is false.

Parameters

String sRVarName
A potential R identifier.

Remarks

Use this method to determine whether a string can be used as an R identifier.

Example
Title = "IML Studio";
Message = "Enter the name for the new R variable:";
ok = DoDialogGetString( VarName, Title, Message );
if ok = 0 then quit;

if !R.IsValidIdentifier( VarName ) then
    Runtime.Error( "You entered an invalid R variable name." );

submit VarName / R;
&VarName <- 1:5;
&VarName
endsubmit;