[R-sig-DB] Data manipulation: transforming SQL query in an appropriate dataframe

Hebbertt de Farias Soares hebbertt@@o@re@ @end|ng |rom ro@@@o|||ce@com
Fri Sep 5 16:13:19 CEST 2008


Dear list,

I am a beginner with R and I have  a question which may sound stupid: How can I transform my SQL query into an appropriate dataframe?

I've looking around, and haven't found any solution.

My return data is stored in a SQL database. When I query it, it  gives me the following output:
Id            Fund                     Return                 Period
1             Fund01                0,5                         may/08
2             Fund01                0,4                         june/08
3             Fund 02               -0,3                        may/08
4             Fund02                -0,4                        june/2008

However this data is not suitable for analysis. I would like to transform it to a format like:

Period                  Fund01                Fund02
May/08                0,5                         0,4
June/08               -0,3                        -0,4

Is it possible to do this with R? Could you please recommend me references or packages which are useful for handling this kind of data?

Thank you very much for your time.

Regards,

Hebbertt



	[[alternative HTML version deleted]]




More information about the R-sig-DB mailing list