to connect kobo to Rstudio there’s a couple of functions you can use here: https://unhcr.github.io/koboloadeR/docs/reference/index.html - see Kobo API scripts
You may also check ODKR package from validmeasures - as it uses briefcase to retrieve dataset that contains repeat tags - i.e. hierarchical dataset -
You may vote for this feature request: Export repeat tables as zipped csv files from API - Feature Request