Get Invalid Formula using MAD

Jun 3, 2014 at 10:04 PM

I tried to use kMedoidsClustering.R with MAD and I am getting this error.

I installed R Integration Pack and put kMedoidsClustering.R on C:\Program Files (x86)\R Integration Pack\RScripts. The I imported StorePerformanceAnalysis App and tried to create a new metric like RScript<NumericParam1=4, NumericParam2=10,_RScriptFile="kMedoidsClustering.R">([Median
Income],Population,[Store Sqft],[Store Age],Competitors).

I get "invalid formula" message. I noticed that RScript function exists on MAD and I validated the sintax with deployR inside RStudio.

Jul 31, 2014 at 9:24 PM
Sorry for the delay in responding. It's been a while... hopefully you've solved your problem by now.

If not, while it looks like your metric expression is correct syntactically (you have commas in all the right places, the <..>, [..], (..) all look correct), there are a couple other issues that would prevent the metric expression from validating:
  • The RScript functions are not available in the project: While you installed the R Integration Pack, many MicroStrategy Analytics Enterprise users miss the step of running the configuration wizard to add the RScript functions to their project's metadata... but you're using MAD so that wouldn't apply.
  • The names of the metrics don't exactly match.
Hope this helps, and good luck!