[R] and now a "cut" question

Joshua Wiley jwiley.psych at gmail.com
Tue Jun 21 02:50:38 CEST 2011


Look at the documentation for ?cut, specifically the dig.lab argument:

cut(xm1, 4, dig.lab = 5)

Cheers,

Josh

On Mon, Jun 20, 2011 at 5:46 PM, Erin Hodgess <erinm.hodgess at gmail.com> wrote:
> Hello again R People:
>
> I have the following:
>
>> xm1[,1]
>  [1] 13053 13068 13068 13053 14853 14853 14850 14850 13053 13053 13068 13068
>> cut(xm1[,1],4)
>  [1] (1.31e+04,1.35e+04] (1.31e+04,1.35e+04] (1.31e+04,1.35e+04]
>  [4] (1.31e+04,1.35e+04] (1.44e+04,1.49e+04] (1.44e+04,1.49e+04]
>  [7] (1.44e+04,1.49e+04] (1.44e+04,1.49e+04] (1.31e+04,1.35e+04]
> [10] (1.31e+04,1.35e+04] (1.31e+04,1.35e+04] (1.31e+04,1.35e+04]
> 4 Levels: (1.31e+04,1.35e+04] (1.35e+04,1.4e+04] ... (1.44e+04,1.49e+04]
>>
>
> Is there any way to have the levels print as 13100, 13500, etc., please?
>
> Thanks,
> Erin
>
>
> --
> Erin Hodgess
> Associate Professor
> Department of Computer and Mathematical Sciences
> University of Houston - Downtown
> mailto: erinm.hodgess at gmail.com
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Joshua Wiley
Ph.D. Student, Health Psychology
University of California, Los Angeles
http://www.joshuawiley.com/



More information about the R-help mailing list