;(load "ter2") ;(load "nels") ;(load "missing") ;(load "nels-samp") (def row-ind (list 316 444 275 126 54 88 243 792 972 668 947 431 132 286 341 485 336 359 236 285 74 897 516 221 172 73 55 683 234 120 525 371 563 184 191 748 26 762 1037 607)) (defun sample-schools-file (file) (let* ((r (array-dimension schl-data 0)) (row-ind row-ind) (col-ind (cons 0 (1+ (car (choose-subset-dialog "School Variables" (cdr schl-labels)))))) (stud-ind (cons 0 (1+ (car (choose-subset-dialog "Student Variables, last var is dependent" (cdr stud-labels))))))) (print row-ind) (print col-ind) (setf school (select schl-data row-ind col-ind)) (setf sch-chosen (combine (car (column-list school)))) (setf student nil) (dolist (row (row-list stud-data)) (if (member (elt row 0) sch-chosen) (if student (setf student (bind-rows student (select row stud-ind))) (setf student (select row stud-ind))))) ;(setf student (select stud-data (iseq (array-dimension stud-data 0)) stud-ind)) (setf school-l (select schl-labels col-ind)) (setf student-l (select stud-labels (select stud-ind (iseq (- (length stud-ind) 1))))) (savevar '(school-l school student-l student) file))) ; (make-terrace ; (select schl-data row-ind col-ind) ; (select stud-data (iseq (array-dimension stud-data 0)) stud-ind) ; :x-labels (select stud-labels ; (select stud-ind (iseq (- (length stud-ind) 1)))) ; :z-labels (select schl-labels col-ind))))