Closed jfrydendall closed 8 years ago
After having a look at the problem again I found out the issue is related to #135. According to the GAM manual the gam method is a S3 method.
I found this workaround based on the suggestions in #135:
#load "..\packages\FsLab\FsLab.fsx"
open RProvider
open RProvider.ISLR
open RProvider.datasets
open RProvider.``base``
open RProvider.gam
let df = R.wage
let formula = "gam(wage~lo(year,age,span=0.5)+education,data=df)"
let df = R.assign("df",df)
let gam_fit = R.eval(text="library(gam)"))
let gam_fit = R.eval(R.parse(text=formula))
I have tried to use the gam packages through the RProvider. I get the following error:
RDotNet.EvaluationException: Error: $ operator is invalid for atomic vectors
my code looks like this:
The code works just fine within R. How can I get this example to work?