Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Generating Statistics Info
Message
From
27/05/1999 12:19:42
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
27/05/1999 12:03:55
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00223474
Message ID:
00223516
Views:
19
>>>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform