vendredi 25 août 2017

How can I arrange data using R following these conditions?

I am a new to programming. When I load my data into R I find:

>str(g)
data.frame':    253227 obs. of  2 variables:

 $ ID             : int  7896741 7896743 7896745 7896747 7896749 7896751 7896753 7896755 7896757 7896758 ...
 $ gene_assignment: Factor w/ 85855 levels "","---","AB001736 // IGLJ3 /// AB001733 // IGLJ3 /// ENST00000390609 // IGHV3-23 /// X14584 // IGHV3-23 /// BC072419 // "| __truncated__,..: 16002 81923 16018 2 2 2335 2 2392 5497 5497 ...

  1. How can I remove two categories ("";"---") from $gene_assignment? What type of code should I use?

  2. “ AB001736 // IGLJ3 /// AB001733 // IGLJ3 /// ENST00000390609 // IGHV3-23 /// X14584 // IGHV3-23 /// BC072419 // "|

This factors contains many parameters but some are common like ENST00000390609 or AB001733. How can I remove these values?

Aucun commentaire:

Enregistrer un commentaire