I asked a related question here and the response worked well: using parallel's parLapply: unable to access variables within parallel code
The problem is when I
By default clusterExport looks in the .GlobalEnv for objects to export that are named in varlist. If your objects are not in the .GlobalEnv, you must tell clusterExport in which environment it can find those objects.
You can change your clusterExport to the following (which I didn't test, but you said works in the comments)
clusterExport(cl=cl, varlist=c("text.var", "ntv", "gc.rate", "pos"), envir=environment())
This way, it will look in the function's environment for the objects to export.