The following code produces the error:
Error in match.arg(transform) : 'arg' should be one of “”, “diff”, “rdiff”, “normalize”, “cumul”, “rdiff_from” Called from: match.arg(transform)
library(Quandl)
std_chart<-function(qcode, type="raw", transform= "", collapse="", logscale="",
main="", xlab="", ylab="", recession_shading=TRUE, hline="",
trend=""){
data<-Quandl(code=qcode,type=type,transform=transform,collapse=collapse)
return(data)
}
std_chart(qcode="FRED/GDP",
logscale="log10",
main="Gross Domestic Product (GDP) Value",
ylab="Billions of Dollars")
std_chart(qcode="FRED/GDP",
transform="",
logscale="log10",
main="Gross Domestic Product (GDP) Value",
ylab="Billions of Dollars")
Both calls to the function produce the same error. When I debug it seems the argument is one of the choices per the following:
Browse[1]> arg==choices[1] [1] TRUE
I've used this Quandl function many times without problem. Any help appreciated. I'm thinking the problem is obvious and I'm still missing it. This is just a simplified version of what I am actually trying to do to focus on the error.
Using R version 3.1.2 Quandl version 2.8.0