Q: compare one list item against the rest in R If you have a list of files, and you want to compare 1 against a set of the others, how do you do it?
my.test <- list[1]
my.reference.set <- list[-1]

This works of course, but I want to have this in a loop, with my.test varying each time (so that each file in the list is my.test for one iteration i.e. I have a list of 250 files, and I want to do this for every subset of 12 files within it. 
> num <- (1:2)
> sdasd<- c("asds", "ksad", "nasd", "ksasd", "nadsd", "kasdih")
> splitlist<- split(sdasd, num)
> splitlist
$`1`
[1] "asds"  "nasd"  "nadsd"

$`2`
[1] "ksad"   "ksasd"  "kasdih"

> for (i in splitlist) {my.test <- splitlist[i] # "asds"
+ my.reference.set <- splitlist[-i] # "nasd" and "nadsd"
+ combined <- data.frame (my.test, my.reference.set)
+ combined}
Error in -i : invalid argument to unary operator
> 

then i want next iteration to be, 
my.test <- splitlist[i] #my.test to be "nasd"
my.reference.set <- splitlist[-i] # "asds" and "nadsd"
}

and finally for splitlist[1], 
my.test <- splitlist[i] # "nadsd" 
my.reference.set <- splitlist[-i] # "asds" and "ksad"
}

Then the same for splitlist[2]

A: Does this do what you want?  The key point here is to loop over the indices of the list, rather than the names, because x[-n] indexing only works when n is a natural number (with some obscure exceptions).  Also, I wasn't sure if you wanted the results as a data frame or a list -- the latter allows the components to be different lengths.
num <- 1:2
sdasd <- c("asds", "ksad", "nasd", "ksasd", "nadsd", "kasdih")
splitlist<- split(sdasd, num)
L <- vector("list",length(splitlist))
for (i in seq_along(splitlist)) {
    my.test <- splitlist[[i]] # "asds"
    my.reference.set <- splitlist[-i] # "nasd" and "nadsd"
    L[[i]] <- list(test=my.test, ref.set=my.reference.set)
}

edit: I'm still a little confused by your example above, but I think this is what you want:
refs <- lapply(splitlist,
     function(S) {
         lapply(seq_along(S),
            function(i) {
               list(test=S[i], ref.set=S[-i])
           })
     })

refs is a nested list; the top level has length 2 (the length of splitlist), each of the next levels has length 3 (the lengths of the elements of splitslist), and each of the bottom levels has length 2 (test and reference set).
