Open-Systems-Pharmacology / rSharp

R package for communication with .NET Core
http://www.open-systems-pharmacology.org/rSharp/
GNU General Public License v2.0
1 stars 0 forks source link

Implement `is` in .NET #67

Open PavelBal opened 8 months ago

PavelBal commented 8 months ago

rClr offers a function to check whether an object is of a certain type:

https://github.com/Open-Systems-Pharmacology/rClr/blob/c764e5d8554377555c90323e63564aa73d4eb58b/R/rClr-exported.R#L343

Instead of doing it in R, let's do it in .NET directly. Probably a static function that receives an object and either a string of a type, or a Type object, and returns a boolean.

PavelBal commented 8 months ago

Not v1.

PavelBal commented 8 months ago

https://github.com/Open-Systems-Pharmacology/rSharp/blob/4bbb33b3ec3c3ffa872b4d047f44997508cbccc4/tests/testthat/test-utilities-static.R#L9