Use the Keyboard in the Formula Editor

Top  Previous  Next

How To... > Work with Formulas > Work with the Formula Editor > Use the Keyboard in the Formula Editor

You can always type a formula in the editor. Most “traditional” keyboard shortcuts for math work. Selection is important.

 

To get …

Type …

_img413

Ctrl+Shift+R (Win) Option+Shift+R (Mac), then area

_img414

pi

_img415

width^2

_img416

P, then Ctrl+< (Win) Option+< (Mac), then 0.5

_img417

x+1, then

_img418,

_img418, then /2; alternatively, use parentheses: (x+1)/2

_img419

x^2, then

_img420, then +1

Use * for multiply, / for divide, and ^ for exponentiation.

Most familiar functions work using the most common abbreviation: sin, random, floor, ln, log, asin, exp, sgn, to name a few. Functions require parentheses around their arguments, as in sin(x).

Use _img420 to get the cursor out of an exponent, root, or the denominator of a fraction.

Did π not appear when it should have? When you type pi and then immediately type another letter or a number, Fathom doesn’t know that you mean pi to be its own word. After typing pi, press one of the arrow keys or the space bar (or * if you want to multiply). After the π appears, you can type anything you want, and the π will remain π.

Entering one vertical bar “|” makes a pair of absolute-value bars.

The double-quote key makes a pair of quotes.

The open parenthesis “(” makes a pair of parentheses.

_img421

 

When you type if( you get a complete (though empty) if-statement, with three parts for you to fill in. Type the condition (for example, income > 100000), then press Tab to move to the results (result-if-true goes on the top, result-if-false on the bottom). If you want the results to be words (also known as strings), you must surround them with quotation marks.

When you have more than two results, instead of nesting if-statements, you can use the switch function. This is useful for recoding attributes. It takes an optional expression inside parentheses and then evaluates each of any number of true/false expressions to determine which value to return. To add an alternative, press Insert (Win) or Option+Return (Mac) on your keyboard.

To insert something in the beginning, don’t click to place your cursor; instead, arrow to the beginning before adding to the existing formula.