Thank you for your reply. Your suggestion is correct for my MWE.
I receive an error and see my MWE was not correct. Unfortunately I do not know how to make a different MWE. In this case, x2 is a Vector{NTuple{5,Float64}}.
I receive the error
DimensionMismatch("mismatch in dimension 1 (expected 50001 got 1)")
in top-level scope at Schneider et al 2016 running.jl:220
in hcat at base\abstractarray.jl:1544
in at base\abstractarray.jl:1564
in #cat#110 at base\abstractarray.jl:1564
in _cat at base\abstractarray.jl:1435
in at base\abstractarray.jl:1437
in #cat_t#109 at base\abstractarray.jl:1437
in _cat_t at base\abstractarray.jl:1440
in cat_shape at base\abstractarray.jl:1395
in cat_shape at base\abstractarray.jl:1395
in _cshp at base\abstractarray.jl:1416
in _cs at base\abstractarray.jl:1420
If you update DataFrames, you will be able to do df[:, "a string"] rather than using symbols everywhere. But my code snipped above works if you replace df[:, "a$i"] with df[:, Symbol(:a, i)].