- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to deactivate scientific notation of numbers in R?
We can use options(scipen=999) to do this.
Example
> x <-c(253,254,36,874,351,651,245,274,19,1095) > t.test(x,mu=2000)
One Sample t-test
data: x t = -14.212, df = 9, p-value = 1.801e-07 alternative hypothesis: true mean is not equal to 2000
95 percent confidence interval −
151.3501 659.0499
sample estimates −
mean of x 405.2
Here p-value is in scientific notation. Now we can deactivate it as follows −
> options(scipen=999) > t.test(x,mu=2000)
One Sample t-test
data: x t = -14.212, df = 9, p-value = 0.0000001801 alternative hypothesis: true mean is not equal to 2000
95 percent confidence interval −
151.3501 659.0499
sample estimates −
mean of x 405.2
If we want to activate scientific notation again then it be done as shown below −
> options(scipen=0) > t.test(x,mu=2000)
One Sample t-test
data: x t = -14.212, df = 9, p-value = 1.801e-07 alternative hypothesis: true mean is not equal to 2000
95 percent confidence interval −
151.3501 659.0499
sample estimates −
mean of x 405.2
- Related Articles
- How to display numbers in scientific notation in Java?
- How to remove scientific notation form base R plot?
- How to find the mean of very small numbers in numeric form that are represented with scientific notation in R?
- Express 5600000 in Scientific notation.
- Prevent scientific notation in matplotlib.pyplot
- How to change the font size of scientific notation in Matplotlib?
- How to repress scientific notation in factorplot Y-axis in Seaborn / Matplotlib?
- How to remove scientific notation from a Matplotlib log-log plot?
- Express the number of seconds in two years in scientific notation.>
- How to convert a String containing Scientific Notation to correct JavaScript number format?
- How to change number formatting from scientific to numbers of axes labels in a scatterplot using ggplot2 package in R?
- How to display xtable values in scientific form in R?
- Show decimal places and scientific notation on the axis of a Matplotlib plot
- How to activate and deactivate JFrame in Java
- How to Deactivate or Delete Facebook Messenger

Advertisements