How to avoid scientific notation present in the Intervals created by the cut function.
a<-seq(10000,50000, by=500 )
cut(a, breaks = seq(0,max(a)+300, by = 300))
I have tried the below but it doesn't help.
options("scipen"=100, "digits"=4)
First of all, create a vector and its plot using plot function. Then, use options(scipen=999) to remove scientific notation from the plot.
Remove notation in the entire R session You can disable scientific notation in the entire R session by using the scipen option. Global options of your R workspace. Use options(scipen = n) to display numbers in scientific format or fixed.
(1) Right-click a cell where you want to remove scientific notation, and (2) choose Format Cells… 2. In the Format Cells window, (1) select the Number category, (2) set the number of decimal places to 0, and (3) click OK. Now the scientific notation is removed.
The scale_x_continuous() and scale_y_continuous() methods can be used to disable scientific notation and convert scientific labels to discrete form.
As suggested by Pascal,
Try with adding the argument dig.lab = 5 to cut function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With