Hi it is not stated that the cut shall return ordered factor. If you want you can use
ordered(cut( breaks=3, sample(10 ) )) or modify code for cut.default to accept ordered switch. HTH Petr On 29 Nov 2006 at 9:59, Wolfram Fischer wrote: Date sent: Wed, 29 Nov 2006 09:59:36 +0100 From: Wolfram Fischer <[EMAIL PROTECTED]> To: [email protected] Subject: [R] Why the factor levels returned by cut() are not ordered? > What is the reason, that the levels of the factor > returned by cut() are not marked as ordered levels? > > > is.ordered( cut( breaks=3, sample(10 ) ) ) > FALSE > > > help(factor) > ... > If 'ordered' is 'TRUE', the factor levels are assumed to be > ordered. ... > > Wolfram > > ______________________________________________ > [email protected] 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. Petr Pikal [EMAIL PROTECTED] ______________________________________________ [email protected] 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.
