Skip to content
Prev 308806 / 398503 Next

factor or character

Hi,

The program below work very well.

(snps = c('rs621782_G', 'rs8087639_G', 'rs8094221_T', 'rs7227515_A',
'rs537202_C'))
Selec = todos[ , colnames(todos) %in% snps]
head(Selec)


But, I have a data set with 1.000 columns and I need extract 70 to use
(like snps in command above).

This 70 snps are in a file. So I create a file to extract them with

(mod5.sig = with(mod5, data.frame(snps = SNP[pvalor < 5e-8])))
str(mod5.sig)
(snps = (mod5.sig))

The structure is:
'data.frame':	76 obs. of  1 variable:
 $ snps: Factor w/ 220 levels "rs10058955_A",..: 89 59 88 73 40 35 97 55
87 204 ...

But it doesn't work. The output is:
data frame with 0 columns and 6 rows

What's is wrong?

Thanks a lot,


---------------------------------------------
Silvano Cesar da Costa

Universidade Estadual de Londrina
Centro de Ci?ncias Exatas
Departamento de Estat?stica

Fone: (43) 3371-4346