Last active
          August 29, 2015 13:57 
        
      - 
      
- 
        Save mathias-brandewinder/9919522 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #r @"Deedle.0.9.12\lib\net40\Deedle.dll" | |
| #r @"Deedle.RPlugin.0.9.12\lib\net40\Deedle.RProvider.Plugin.dll" | |
| open Deedle | |
| open Deedle.RPlugin | |
| let codesSeries = | |
| Series( | |
| countries |> Seq.map (fun c -> c.Code) |> Seq.toList, | |
| countries |> Seq.map (fun c -> c.Code) |> Seq.toList) | |
| let pop2010Series = | |
| Series( | |
| countries |> Seq.map (fun c -> c.Code) |> Seq.toList, | |
| countries |> Seq.map (fun c -> c.Indicators.``Population (Total)``.[2010]) |> Seq.toList) | |
| let pop2000Series = | |
| Series( | |
| countries |> Seq.map (fun c -> c.Code) |> Seq.toList, | |
| countries |> Seq.map (fun c -> c.Indicators.``Population (Total)``.[2000]) |> Seq.toList) | |
| let deedleFrame = Frame(["Codes"; "Pop 2000"; "Pop 2010" ], [ codesSeries; pop2000Series; pop2010Series]) | |
| let rFrame = R.as_data_frame(deedleFrame) | |
| rFrame.Print() | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
The issue is that the last release does not handle spaces in column names. So using
Pop2010andPop2000will make it work.Also, the
SeriesandFrameconstructors are maybe not the best way to create them. I much prefer usingseriesandframefunctions: