Thank you so much!! This is very helpful.
On 02/01/2017 02:46 PM, Ramiro Barrantes wrote:
> Hello,
>
> I have a function that applies to an S4 object which contains a slot called
> @analysis:
>
> function calculation(myObject) {
> tmp <- myObjects@analysis
> result <- ...operations on
On 02/01/2017 02:46 PM, Ramiro Barrantes wrote:
Hello,
I have a function that applies to an S4 object which contains a slot called
@analysis:
function calculation(myObject) {
tmp <- myObjects@analysis
result <- ...operations on analysis...
return result
}
I am writing a unit test for
You seem like you have painted yourself into a corner... you want to access
slots in an S4 object yet you don't want to create one. Are you going to do
this test without the benefit of an operating system either?
Beware of getting too meta... David didn't say you had to use an S4 object
Yes, so are you suggesting that I create an instance of my S4 class in order to
test my function.
My understanding is that ideally the test should not depend on any code besides
the one that I am testing.
I just thought that you could perhaps define a mock class so that I would not
need to
> On Feb 1, 2017, at 11:46 AM, Ramiro Barrantes
> wrote:
>
> Hello,
>
> I have a function that applies to an S4 object which contains a slot called
> @analysis:
>
> function calculation(myObject) {
> tmp <- myObjects@analysis
> result <- ...operations on
5 matches
Mail list logo