I guess, my matrix design does not fit the dimentions of my microarray dataset (Array_tumorandstroma2). And probably this is way the lm.fit function does not work. Can anyone please advise me to better matrix design?

I also tried an other matrix design, but that resulted in the same problem:

It looks like you're using the wrong function. Limma provides 'lmFit', not the lm.fit function you're using, which is something entirely different. Also, it's probably worth turning Array_tumorandstroma2 into a numeric matrix, rather than the data.frame that read.table returns. And for safety, I'd find some way of deriving the factor describing T and sT programmatically from the column names of the table, rather than explicitly enumerating them, or at least enumerating them in a more readable (and debug-able) fashion, e.g. rep(c("cancer", "stroma"), times=c(25,25)) - if you're really sure that the samples come in blocks, with cancer first.

Thank you for your reply. You are totally right, I was using the wrong function. I have now turned the dataframe into a numeric matrix. I ordered all the samples in the csv file, so I know fore sure, that the 25 first samples are from cancer, and that the last 25 sampls are from stroma.

I ran into a new problem, about my design matrix. I get the error-message:

Your design matrix is constructed from a factor (vector) that is 100 elements long. The first 50 are "1" and the second "50" are "2", but you said yourself that you have 25 elements per group, so ... why are you doing rep(..., each=50)?

Fix it so that you have as many labels as samples ... and, btw: had you followed Gavin's advice re: extracting class labels (tumor/stroma) from column names of your samples, you wouldn't be having this problem ;-)