I'm parsing a CSV with F#'s CsvProvider and successfully creating two lists :
let times = [ for row in airinfo.Rows -> row.Time ]
let passengers = [ for row in airinfo.Rows -> row.AirPassengers ]
times is a decimal list and passengers is an int list.
Ultimately I'm trying to run:
R.plot (times, passengers)
For starters though R.plot passengers works, but R.plot times doesn't, which leads me to believe that the problem is in plotting a decimal list.
I get the following exception:
System.Exception: No converter registered for type Microsoft.FSharp.Collections.FSharpList`1[[System.Decimal, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] or any of its base types
at [email protected] (System.String message) [0x00001] in <57161c90b86b2a10a7450383901c1657>:0 at Microsoft.FSharp.Core.PrintfImpl+StringPrintfEnv
1[TResult].Finalize () [0x00012] in <5893d081904cf4daa745038381d09358>:0 at Microsoft.FSharp.Core.PrintfImpl+Final1@224[TState,TResidue,TResult,A].Invoke (Microsoft.FSharp.Core.FSharpFunc2[T,TResult] env, A a) [0x00038] in <5893d081904cf4daa745038381d09358>:0 at Microsoft.FSharp.Core.OptimizedClosures+Invoke@3253[T2,TResult,T1].Invoke (T2 u) [0x00001] in <5893d081904cf4daa745038381d09358>:0 at RProvider.RInteropInternal.convertToR[inType] (RDotNet.REngine engine, inType value) [0x00061] in <57161c90b86b2a10a7450383901c1657>:0 at RProvider.RInteropInternal.REngine.SetValue (RDotNet.REngine this, System.Object value, Microsoft.FSharp.Core.FSharpOption1[T] symbolName) [0x00001] in <57161c90b86b2a10a7450383901c1657>:0 at RProvider.RInteropInternal.toR (System.Object value) [0x00019] in <57161c90b86b2a10a7450383901c1657>:0 at RProvider.RInterop.passArg@447 (System.Collections.Generic.List1[T] tempSymbols, System.Object arg) [0x00123] in <57161c90b86b2a10a7450383901c1657>:0 at [email protected] (System.Collections.Generic.IEnumerable1[System.String]& next) [0x000d8] in <57161c90b86b2a10a7450383901c1657>:0 at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase1[T].MoveNextImpl () [0x00017] in <5893d081904cf4daa745038381d09358>:0 at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase1[T].System-Collections-IEnumerator-MoveNext () [0x00001] in <5893d081904cf4daa745038381d09358>:0 at System.Collections.Generic.List1[T]..ctor (System.Collections.Generic.IEnumerable1[T] collection) [0x00077] in <48b95f3df5804531818f80e28ec60191>:0 at Microsoft.FSharp.Collections.SeqModule.ToArray[T] (System.Collections.Generic.IEnumerable1[T] source) [0x0006a] in <5893d081904cf4daa745038381d09358>:0 at RProvider.RInterop.callFunc (System.String packageName, System.String funcName, System.Collections.Generic.IEnumerable`1[T] argsByName, System.Object[] varArgs) [0x0001d] in <57161c90b86b2a10a7450383901c1657>:0 at .$FSI_0012.main@ () [0x0002f] in <511174b5879343f6b1c4aa72a97ef951>:0 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <48b95f3df5804531818f80e28ec60191>:0
Any help is greatly appreciated.
