create_batches() is the only non-S4 function. Should I something like a BatchList class to store the list of IntegerList batches? That way the input to train() will also have an S4 object instead of list as the second argument.
I understand this question as: "I have code that is not an S4 method or object, is it okay?"
It is okay to have S4, S3 and other non object oriented functions, you only need to use object oriented programming when it makes sense or are reusing other existing infrastructure.
Think on what makes sense on your package or field, if there is a need for a new class or if methods make sense for it (Probably it won't and it is perfectly fine)
create_batches()
is the only non-S4 function. Should I something like aBatchList
class to store the list ofIntegerList
batches? That way the input totrain()
will also have an S4 object instead oflist
as the second argument.I understand this question as: "I have code that is not an S4 method or object, is it okay?"
It is okay to have S4, S3 and other non object oriented functions, you only need to use object oriented programming when it makes sense or are reusing other existing infrastructure.
Think on what makes sense on your package or field, if there is a need for a new class or if methods make sense for it (Probably it won't and it is perfectly fine)