search for: myclassa

Displaying 3 results from an estimated 3 matches for "myclassa".

Did you mean: myclass
2010 Jul 21
1
Bug: broken exception handling in S4 methods
...r example is a result of trying to write a unit test for a constructor of a class object which should fail under certain conditions. This failure obviously need to be caught for the unit test to proceed. However, it is a general problem with handling some exceptions in R. # Consider a simple class MyClassA, which is derived from numeric and for which # we define a constructor (in form of a method). On its own this class works nicely # and so does exception handling of it: setClass("MyClassA", contains = "numeric", validity = function(object) { stopifnot(obje...
2007 Feb 04
2
Problem using ofstream in C++ class in package for MacOS X
...ecute writeFileC.R on my Intel-MacBook Pro, but not writeFileCpp.R. Executing my functions I get the following output: > library(MyClass) Welcome to MyClass > writeFileC("myout_fileC.txt") [1] "outfile = myout_fileC.txt" Writing file myout_fileC.txt using C style. ---MyClassA::MyClassA()--------- ---MyClassA::WriteFileC--------- <20> records exported. ---MyClassA::~MyClassA()--------- [1] "writeFileC finished" NULL > writeFileCpp("myout_fileCpp.txt") [1] "outfile = myout_fileCpp.txt" Writing file myout_fileCpp.txt using C++ style...
2011 Apr 05
1
super basic questions about S4 classes
Apologies for asking something that is probably super obvious, i just started with S4 classes and i guess i am not finding documentation that layout the grammar rules and give enough examples. Some questions i am having are these 1. I understand that main method of writing a member function is to write a generic function and setMethod for this particular object. This, however, presumes that there