>>>Can anyone direct me to any statistical generation methods/functions for VFP?
>>>
>>>I'd like to know:
>>>
>>>Mean,Mode,Median,High/Low,Std Dev...stuff like that.
>>>
>>>TIA,
>>>
>>>/Chris
>>
>>You can get average and standard deviation (as well as some others) by using CALCULATE. Check the help file for details.
>
>George,
>
>I was able to generate all I need but median. Anything for that?
>
>/Chris
"Median" ? Is it the value sitting in middle in a series ? If so and number of elements <= 65000 a simple way might be :
select myValue into array myArray where !isnull(myValue)
if type("myArray") # "U"
if alen(myArray,1) > 1
return myArray[floor(alen(myArray,1)/2) + 1]
else
return myArray[1]
endif
endif
return .null.
Cetin