as.farsi: Generic functions and methods for S3 class persian

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

View source: R/farsi.R

Description

The functions as.farsi and farsi are fully equivalent generic constructor functions for the S3 class farsi, which allows numeric objects to be represented in the form of their customary persian expression.

Usage

1
2
3
4
5
6
7
8
as.farsi(x, ...)
farsi(x, ...)
## S3 method for class 'numeric'
farsi(x, ...)
## S3 method for class 'farsi'
farsi(x, ...)
## Default S3 method:
farsi(x, ...)

Arguments

x

Any numeric object. If the components are not integers, they are rounded. In the case of farsi.default this may be an object of any class, but will always result in an error.

...

Currently unused.

Details

The function farsi is a generic constructor function for objects of class farsi. The methods either mark the object as having the appropriate class, or, in the case of farsi.default, result in an error message. The function as.farsi is provided as a corresponding function to as.roman in the utils package. The method farsi.farsi simply allows the constructor function to act as a coercion and to have no effect on objects already of the class.

Value

An object of class farsi, if possible, or an error message if not.

Author(s)

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

References

See original note by Sadegh Rasoulinejad at

See Also

as.character.farsi, print.farsi.

Examples

1
as.farsi(10001001) + (-5):5

Example output

 [1] <U+062F><U+FEE9> <U+FEE3><U+FBFE><U+FEDF><U+FBFE><U+0648><U+FEE5> <U+0648> <U+FEE7><U+FEEC><U+FEBB><U+062F> <U+0648> <U+FEE7><U+0648><U+062F> <U+0648> <U+FEB7><U+FEB5>
 [2] <U+062F><U+FEE9> <U+FEE3><U+FBFE><U+FEDF><U+FBFE><U+0648><U+FEE5> <U+0648> <U+FEE7><U+FEEC><U+FEBB><U+062F> <U+0648> <U+FEE7><U+0648><U+062F> <U+0648> <U+FEEB><U+FED3><U+FE95>
 [3] <U+062F><U+FEE9> <U+FEE3><U+FBFE><U+FEDF><U+FBFE><U+0648><U+FEE5> <U+0648> <U+FEE7><U+FEEC><U+FEBB><U+062F> <U+0648> <U+FEE7><U+0648><U+062F> <U+0648> <U+FEEB><U+FEB7><U+FE95>
 [4] <U+062F><U+FEE9> <U+FEE3><U+FBFE><U+FEDF><U+FBFE><U+0648><U+FEE5> <U+0648> <U+FEE7><U+FEEC><U+FEBB><U+062F> <U+0648> <U+FEE7><U+0648><U+062F> <U+0648> <U+FEE7><U+FEEA>
 [5] <U+062F><U+FEE9> <U+FEE3><U+FBFE><U+FEDF><U+FBFE><U+0648><U+FEE5> <U+0648> <U+FBFE><U+FB90> <U+FEEB><U+0632><U+FE8E><U+0631> <U+0648>
 [6] <U+062F><U+FEE9> <U+FEE3><U+FBFE><U+FEDF><U+FBFE><U+0648><U+FEE5> <U+0648> <U+FBFE><U+FB90> <U+FEEB><U+0632><U+FE8E><U+0631> <U+0648> <U+FBFE><U+FB90>
 [7] <U+062F><U+FEE9> <U+FEE3><U+FBFE><U+FEDF><U+FBFE><U+0648><U+FEE5> <U+0648> <U+FBFE><U+FB90> <U+FEEB><U+0632><U+FE8E><U+0631> <U+0648> <U+062F><U+0648>
 [8] <U+062F><U+FEE9> <U+FEE3><U+FBFE><U+FEDF><U+FBFE><U+0648><U+FEE5> <U+0648> <U+FBFE><U+FB90> <U+FEEB><U+0632><U+FE8E><U+0631> <U+0648> <U+FEB3><U+FEEA>
 [9] <U+062F><U+FEE9> <U+FEE3><U+FBFE><U+FEDF><U+FBFE><U+0648><U+FEE5> <U+0648> <U+FBFE><U+FB90> <U+FEEB><U+0632><U+FE8E><U+0631> <U+0648> <U+FB7C><U+FEEC><U+FE8E><U+0631>
[10] <U+062F><U+FEE9> <U+FEE3><U+FBFE><U+FEDF><U+FBFE><U+0648><U+FEE5> <U+0648> <U+FBFE><U+FB90> <U+FEEB><U+0632><U+FE8E><U+0631> <U+0648> <U+FB58><U+FEE7><U+FE9D>
[11] <U+062F><U+FEE9> <U+FEE3><U+FBFE><U+FEDF><U+FBFE><U+0648><U+FEE5> <U+0648> <U+FBFE><U+FB90> <U+FEEB><U+0632><U+FE8E><U+0631> <U+0648> <U+FEB7><U+FEB5>

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