> Does anybody know how to use regular variables in formula stat > (Stats::Formula)? In "Using the Statistics Package" of M5 documents, it > says regular variables must be qualified with constant() or scalar(). > I've seen examples of constant(), but I could not find any definition or > declaration of scalar(). I tried to use regular variables in formula > without any cast, It seemed work ok, but I want to make sure I use it > correctly.
constant(foo), stores the value of foo at the time the formula is defined and uses that stored value when the formula is evaluated. scalar(foo) wraps the variable foo and reads the variable when the formula is evaluated. It sounds like you want scalar. There are some caveats though. scalar() does not currently work with binning or database output. If you're using neither of those things (which I'm willing to be you're not), then you're fine. Nathan ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ m5sim-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/m5sim-users
