Re: [R] Creating a Hash from Data.Frame

From: Martin Morgan <mtmorgan_at_fhcrc.org>
Date: Sun, 15 Jun 2008 19:27:21 -0700

"Gundala Viswanath" <gundalav_at_gmail.com> writes:

> Hi,
>
> I have the following data frame:
>
>> print(mydatframe)
>
> __DATAFRAME__
>
> V1 V2 V3
> 1 1007_s_at DDR1 discoidin domain receptor tyrosine kinase 1
> 2 1053_at RFC2 replication factor C (activator 1) 2, 40kDa
> 3 117_at HSPA6 heat shock 70kDa protein 6 (HSP70B')
>
> __END__
>
> Is there a way to create a hash with
> V2 as Key and V3 as its value?

This looks like microarray data for which the Bioconductor project (http://bioconductor.org/biocLite.R) might be useful

> source('http://bioconductor.org/biocLite.R')
> biocLite() # installs a number of pacakges
> biocLite('hgu95av2.db') # a particular chip 'annotation' file
> library(hgu95av2.db)
> hgu95av2GENENAME[["1053_at"]]
[1] "replication factor C (activator 1) 2, 40kDa"
> hgu95av2SYMBOL[["1053_at"]]

[1] "RFC2" probe id's are keys, with different 'hash'es underneath and non-trivial functionality neatly encapsulated.

> openVignette()

and then choose AnnotationDbi for additional examples (or via the Bioc web site, following the 'Packages' quick link). Also see the archives and bioc mailing list, mentioned on the site.

Martin

> - Gundala Viswanath
> Jakarta - Indonesia
>
> ______________________________________________
> R-help_at_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.

-- 
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M2 B169
Phone: (206) 667-2793

______________________________________________
R-help_at_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.
Received on Mon 16 Jun 2008 - 02:37:20 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 16 Jun 2008 - 04:31:07 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive