Formatting Scientific Notation for Latex

Formatting Scientific Notation for Latex

In RStudio, I get scientific notation results like 1e-2 or 4e-35. I am using xtable to export such numbers to latex but want them to look like in a regular format in latex i.e., $1 \times 10^{-2}$ or $4 \times 10^{-35}$. How can I code in R to get such regular scientific notation format as the xtable output?

6
Maya Lin-Takahashi
Author

Maya Lin-Takahashi

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.