1

I am writing the documentation for a function of an R package I am building.

In order to have a moderately nice aspect for the help file, I need the equivalent of \bar{x} in ASCII:

\eqn{\bar{x}}{ASCII equivalent}
ralucaGui
  • 73
  • 5

1 Answers1

0

Not sure there's a consensus on the best way to do this, it's more a matter of taste and clarity. Having faced this issue myself, two solutions I have used are:

y = \eqn{\bar{x}}{xbar}
y = \eqn{\bar{x}}{mean(x)}

The advantage of the latter is that when the help is displayed as ASCII, the user can copy/paste (send) the text to an R process, getting an example value for y. This assumes that \bar{x} is shorthand for the mean, as is often the case.

dardisco
  • 5,086
  • 2
  • 39
  • 54