Christofer Bogaso <bogaso.christofer <at> gmail.com> writes:

> 
> Hi again,
> 
> In R, there are various numerics like, NA, Inf, or simple integers etc.
> However I want to include one custom type: "TBD", which R should treat as
> numeric, not character.
> 
> That "TBD" should have same property like Inf, however except this: TBD -
> TBD = 0
> 
> In future, I am planning to add few more properties to TBD.
> 
> Can somebody guide me if this is possible in R, ans also some pointer on
> how can be done in R
> 

Possible? Yes.

Your question might be framed as 

"How do I create a class and write a method for '-' that does ... ?"

The answer is "learn about methods and classes in R".

To get started, see

 ?methods
 ?class
 ?groupGenericFunction-class
 ?groupGeneric

and follow the links therein.


Check the posting guide. If you need to follow up, you should consider
whether the question you have fits better on R-devel.

______________________________________________
R-help@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.

Reply via email to