[PlotXTabs2](https://cran.r-project.org/web/packages/CGPfunctions/vignettes/Using-PlotXTabs2.html) is a function to plot crosstab proportions between categorical variables where there are 3 minimum required parameters

PlotXTabs2(
 data,
 x,
 y)

data as data frame, x, and y column names from this data frame.

I want to call it inside a loop where the column names x, y, are going be strings coming from dataframe colnames(), something like ....

varscat = colnames(df)

```
for(i in 1:(length(varscat)-1)) 
{
  for(j in (i+1):length(varscat))
  {
     tmp <- df[,c(myvars[varscat[i]], myvars[varscat[j]])]

     # ...

     PlotXTabs2( df, x=myvars[varscat[i]], y=myvars[varscat[j]] ) 
 }
}

```

I've been trying to follow examples with eval, do.call with no success, most of them are related to cases where the intended use is to write functions to accept parameters as strings. 

How can I achieve this result?