Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Knowledge Base

Definitive answers from Designer Desktop experts.

Avoiding R Tool Character Errors

CristonS
Alteryx Alumni (Retired)
Created

Errors from the R tool, and macros using R, such as the Association Analysis tool, can be a challenge to troubleshoot. Since R is very particular about naming conventions, and the R macros are very particular about delimiters, one easy way to preemptively limit these errors is to make sure your field names are R-friendly and compliant.


 

Best practices is to use only letters, numbers and the underscore. Any special characters will likely upset R. One hint is "Error: No valid fields were selected." This means that one of the Pipe-to-Rows tools embedded in the R macros could not appropriately parse the field names.


 

For example, the following errors came from the Association Analysis tool, where the field names contain the gamut from asterisks to ampersands:


 

Error: Association Analysis (4): The Action "select fields A" has an error: ParseError: Expected entity name for reference at line 7 and column 30 while processing "Action_UpdateRawXml"

Error: Association Analysis (4): The Action "select fields A" has an error: ParseError: Expected whitespace at line 13 and column 63 while processing "Action_UpdateRawXml"

Error: Association Analysis (3): The Action "select fields A" has an error: ParseError: Unterminated entity reference, 'test' at line 4 and column 30 while processing "Action_UpdateRawXml"


 

If you have a thousand fields with every special character, don't fret. Dynamic Rename and regex to the rescue!


 

Using the Rename Mode: Formula, select all your fields, and replace any non-word character with an underscore:


 

both.JPG


 

Crisis averted! Happy Alteryx-ing.