[R] Repeating tdt function on thousands of variables

Farrel Buchinsky fjbuch at gmail.com
Thu May 4 04:44:45 CEST 2006


Uwe Ligges <ligges <at> statistik.uni-dortmund.de> writes:
> The same way. lapply() and sapply() should work for almost all functions 
> given, if nothing strange happens with environemnts, which is the case here:
> The problem is tdt() itself. Note that it has its argument data set to 
> sys.frame(sys.parent()) as the default, but l/sapply are evaluating in a 
> different environment!
> 
 
I communicated with David Clayton, the person who wrote dgc.genetics. He was 
indeed able to get lapply() and sapply() to work. However I could only get it 
do so when I change the variable names to match tdt's default variable names. 
tdt lets one specify which variable should be used for pedigree, which for 
person ID etcetera. However, I could never get lapply to work when one used 
the tdt in that setting. 

Farrel Buchinsky




More information about the R-help mailing list