Avoid Scientific notation in cut function in R
Asked Answered
C

1

25

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)
Cuisine answered 12/3, 2015 at 8:4 Comment(3)
Try with adding the argument dig.lab = 5.Gig
You can thank the help file ?cut.Gig
The cut() function cheerfully ignores options('scipen'), options('digits') etc. (It's also off-by-2 in the way it handles its own dig.lab parameter)Susuable
C
43

As suggested by Pascal,

Try with adding the argument dig.lab = 5 to cut function.

Cuisine answered 13/3, 2015 at 12:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.