scinot | R Documentation |
Takes a number and returns a version formatted in LaTeX
(suitable for use with Sexpr()
in an Sweave document)
or in expression()
(suitable for plotting),
or plots an axis with labels in scientific notation
scinot(x, format = c("latex", "expression"), delim="$",
pref="", ...)
axis.scinot(side,at)
x |
a numeric vector (of length 1) |
format |
produce LaTeX or expression() format? |
delim |
delimiter to add at beginning and end (latex only) |
pref |
text to put before expression (expression only) |
side |
side on which to plot axis |
at |
list of locations/labels |
... |
additional arguments to |
a character vector (if latex
) or expression (if
expression
); axis.scinot
draws an axis on the
current plot
Ben Bolker
formatC
, expression
,
plotmath
, axis
, axTicks
,
latexSN
in the Hmisc
package, eaxis
in the sfsmisc
package
scinot(1e-5)
scinot(1e-5,digits=0)
scinot(1e-5,"expression")
scinot(1e-5,"expression",pref="p=")
set.seed(1001)
plot(1:100,rlnorm(100,0,2),log="y",axes=FALSE)
axis(side=1)
axis.scinot(side=2) ## fix bug!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.