konfound-project / konfound

R package for carrying out sensitivity analysis
https://konfound-project.github.io/konfound/
Other
15 stars 7 forks source link

pkonfound error #64

Closed jrosen48 closed 7 months ago

jrosen48 commented 7 months ago
> pkonfound(a = 35, b = 17, c = 17, d = 38)
Error in `rownames<-`(`*tmp*`, value = c("Control", "Treatment")) : 
  attempt to set 'rownames' on an object with no dimensions
jrosen48 commented 7 months ago

@qinyun-lin could you look at this one, too?

jrosen48 commented 7 months ago

Also this errors:

> my_table <- tibble::tribble(
+     ~unsuccess, ~success,
+     35,         17,
+     17,         38,
+ )
> 
> pkonfound(two_by_two_table = my_table)
Error in `rownames<-`(`*tmp*`, value = c("Control", "Treatment")) :
attempt to set 'rownames' on an object with no dimensions> my_table <- tibble::tribble(
+     ~unsuccess, ~success,
+     35,         17,
+     17,         38,
+ )
> 
> pkonfound(two_by_two_table = my_table)
Error in `rownames<-`(`*tmp*`, value = c("Control", "Treatment")) :
attempt to set 'rownames' on an object with no dimensions
qinyun-lin commented 7 months ago

should fix now. That is because when defining list, "=" should be kept to keep the name (cannot change to "<-" in this case).