Post Reply 
Customizing Inference App?
11-18-2014, 08:24 AM
Post: #6
RE: Customizing Inference App?
Folks have been very helpful - great forum!

I provided an NumSetup() function for my Inference_Copy() program. When in Inference_Copy app, I can go into the NumSetup view and choose which app to import data from (Statistics_1Var, Statistics_2Var, or Spreadsheet), and depending on the choice ask for the two columns from which to import data into Xlist and Ylist.

The program is below. It would be nice to use Inference_Copy.Method, because I only want to run the code below when the "Regression" method is selected in the symbolic view (the other methods already have import functionality), but it seems the global variable Inference_Copy.Method only has two values: 0 or 1, and there are 4 possible choices!

One other problem is when copying from a spreadsheet column. It seems if the column I want to copy is a computed column (i.e. values come from a spreadsheet formula) then the copy fails with a "Error: Unmatch control word" unless I specify a row range. I wonder what's going on here?

- Mike

EXPORT Inference_Copy()
BEGIN

END;

NumSetup()
BEGIN
LOCAL rtn, src, x, y;

rtn := CHOOSE(src, "Which app to import data from?",
{"Statistics 1Var",
"Statistics 2Var",
"Spreadsheet"});
if (rtn == 0) THEN RETURN end;

// we expect strings, so let the program know this.
x := "";
y := "";

CASE
// import from Statistics 1Var
IF (src == 1) THEN
INPUT({x,y}, "Configure Xlist and Ylist",
{"Xlist", "Ylist"},
{"Specify the source Dn column for Xlist",
"Specify the source Dn column for Ylist"});

EXPR("Xlist := Statistics_1Var." + x);
EXPR("Ylist := Statistics_1Var." + y);
END

// import from Statistics 2Var
IF (src == 2) THEN
INPUT({x,y}, "Configure Xlist and Ylist",
{"Xlist", "Ylist"},
{"Specify the source Cn column for Xlist",
"Specify the source Cn column for Ylist"});

EXPR("Xlist := Statistics_2Var." + x);
EXPR("Ylist := Statistics_2Var." + y);
END

// import from Spreadsheet
IF (src == 3) THEN
INPUT({x,y}, "Configure Xlist and Ylist",
{"Xlist", "Ylist"},
{"Specify the source column and row range for Xlist",
"Specify the source column and row range for Ylist"});

EXPR("Xlist := Spreadsheet." + x);
EXPR("Ylist := Spreadsheet." + y);
END
END;
END;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Customizing Inference App? - mbeddo - 11-16-2014, 12:26 AM
RE: Customizing Inference App? - Han - 11-16-2014, 01:17 AM
RE: Customizing Inference App? - mbeddo - 11-16-2014, 02:08 AM
RE: Customizing Inference App? - Han - 11-16-2014, 02:38 AM
RE: Customizing Inference App? - mbeddo - 11-18-2014 08:24 AM
RE: Customizing Inference App? - Han - 11-18-2014, 02:03 PM
RE: Customizing Inference App? - Han - 11-18-2014, 03:50 PM
RE: Customizing Inference App? - Han - 11-18-2014, 02:23 PM
RE: Customizing Inference App? - salvomic - 03-14-2015, 09:24 PM
RE: Customizing Inference App? - salvomic - 05-14-2015, 09:48 AM



User(s) browsing this thread: 1 Guest(s)