--- Begin Message ---
Hi Vikas. Apply the logic in the example below in your dataframe

> dta
  V1 V1
1 85 32
2 80 33
3 77 11
4 75 56
5 96 43
6 99 12
7 94 32
8 97 44

> dta[,1]>€
[1]  TRUE  TRUE FALSE FALSE  TRUE  TRUE  TRUE  TRUE

> which(dta[,1]>€)
[1] 1 2 5 6 7 8

> ref <- which(dta[,1]>€)

> dta[ref,]
  V1 V1
1 85 32
2 80 33
5 96 43
6 99 12
7 94 32
8 97 44

Tip: pay more attention to what is stored in the R-Help archive and keep
a hardcopy of the Ref-card close to you. A colleague even posted the
newest version today.

http://rpad.googlecode.com/svn/Rpad_homepage/R-refcard.pdf

Cheers,
Filipe

Filipe Botelho
Analista de Riscos
Tesouraria Corporativa
www.votorantim.com.br
fone 55 (11) 3704-3576
fax 55 (11) 3167-1550


-----Mensagem original-----
De: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
Em nome de Bansal, Vikas
Enviada em: sexta-feira, 8 de julho de 2011 17:16
Para: r-help@r-project.org; dwinsem...@comcast.net
Assunto: [R] For column values-Quality control

Dear sir,

I am struggling with a problem.Please help me.
Now I have a dataframe with these columns-

V7 V8             V9
V10
  0  1              G
82
  0  1              CGT
c(90, 92, 96)
  0  1              GA
c(78, 92)
  0  1              GAG
c(90, 92, 92)
  0  1              G
88
  0  1              A
96
  0  1              ATT
c(90, 96, 92)
  0  1              T
94
  0  1              C
97

the values in column V10 corresponds to A,C,G T in column V9.I want only
those whose score is more than 91.so output of above should be-

V7 V8             V9
V10
  0  1              GT                                             c(90,
92, 96)
  0  1              A
c(78, 92)
  0  1              AG                                             c(90,
92, 92)
  0  1              A
96
  0  1              TT                                             c(90,
96, 92)
  0  1              T
94
  0  1              C
97

Can you please tell me the solution.





Thanking you,
Warm Regards
Vikas Bansal
Msc Bioinformatics
Kings College London
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

--- End Message ---
"This message and its attachments may contain confidential and/or privileged 
information. If you are not the addressee, please, advise the sender 
immediately by replying to the e-mail and delete this message."

"Este mensaje y sus anexos pueden contener información confidencial o 
privilegiada. Si ha recibido este e-mail por error por favor bórrelo y envíe un 
mensaje al remitente."

"Esta mensagem e seus anexos podem conter informação confidencial ou 
privilegiada. Caso não seja o destinatário, solicitamos a imediata notificação 
ao remetente e exclusão da mensagem."
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to