sort.farsi: A sorting method for objects of class persian

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/farsi.R

Description

A method for the generic function sort which allows numeric objects of class farsi to be sorted.

Usage

1
2
## S3 method for class 'farsi'
sort(x, decreasing = FALSE, ...)

Arguments

x

An object of class farsi.

decreasing

logical: should the object be sorted in decreasing order?

...

Not currently used.

Details

The method temporarily removes the farsi class, sorts the object components and reinstates the farsi class to the result.

Value

An object of class farsi with its components in numerically sorted order.

Author(s)

Sadegh Rasoulinejad MSc Student of Biostatistics Mashhad University of Medical Sciences (MUMS)

References

See original note by Sadegh Rasoulinejad at

See Also

farsi.

Examples

1
2
(x <- farsi(sample(1:100, 5)))
sort(x)

Example output

[1] <U+FEEB><U+FEB7><U+FE97><U+FE8E><U+062F> <U+0648> <U+FEE7><U+FEEA>
[2] <U+FE91><U+FBFE><U+FEB3><U+FE95> <U+0648> <U+FEB3><U+FEEA>
[3] <U+FE91><U+FBFE><U+FEB3><U+FE95> <U+0648> <U+FEB7><U+FEB5>
[4] <U+FEEB><U+FEB7><U+FE97><U+FE8E><U+062F> <U+0648> <U+FEEB><U+FED3><U+FE95>
[5] <U+FEEB><U+FED3><U+FE95>                                
[1] <U+FEEB><U+FED3><U+FE95>                                
[2] <U+FE91><U+FBFE><U+FEB3><U+FE95> <U+0648> <U+FEB3><U+FEEA>
[3] <U+FE91><U+FBFE><U+FEB3><U+FE95> <U+0648> <U+FEB7><U+FEB5>
[4] <U+FEEB><U+FEB7><U+FE97><U+FE8E><U+062F> <U+0648> <U+FEEB><U+FED3><U+FE95>
[5] <U+FEEB><U+FEB7><U+FE97><U+FE8E><U+062F> <U+0648> <U+FEE7><U+FEEA>

farsi documentation built on May 30, 2017, 7:09 a.m.