Create macro for statistic tests

I have some statisticals test to do like chisq test and I would like to do macro to execute them.
This is my original code

A = matrix(c(1, 1, 19, 37, 0, 3, 15, 36), nrow = 2, byrow = T)

and this is what I try :

qtn_fct <- function(var){
#or chisq.test(base$grp,base[[var]])}


It doesn't work I don't know what else I can do.
Also, if someone knows a lot in statistics test, please contact me in DM I could be interested.
Thank you for your time!