LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-09-2014, 04:25 AM   #1
papori
LQ Newbie
 
Registered: Feb 2011
Posts: 23

Rep: Reputation: 0
gini index


Hi,
Is there any library to calculate gini index, or easy calculate on a column?
Thanks
 
Old 07-09-2014, 09:32 PM   #2
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Hi:

I found the Lorenz curve tool and calculator-

I think you can only use it online.

http://www.peterrosenmai.com/lorenz-...ent-calculator
 
Old 07-10-2014, 07:21 AM   #3
papori
LQ Newbie
 
Registered: Feb 2011
Posts: 23

Original Poster
Rep: Reputation: 0
Thanks, but i know many functions out of linux i can use.
i am looking for somthing in linux - to run in a script.
What you offered is R.
Thanks!
 
Old 07-10-2014, 08:51 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,617

Rep: Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963
Quote:
Originally Posted by papori View Post
Hi,
Is there any library to calculate gini index, or easy calculate on a column?
This is like several of your other threads, where you post without telling us what you've done/tried on your own, and leave out details. "Calculate on a column" can mean different things, but you don't provide ANY samples of the data. You also don't tell us what language you're writing in, or what you're trying to accomplish.
Quote:
Originally Posted by papori
Thanks, but i know many functions out of linux i can use. i am looking for somthing in linux - to run in a script. What you offered is R.
You said in a previous thread of yours that you already write scripts in R...why can't this be done in what you already know? You could put the data into Libreoffice spreadsheet, and 'calculate' from there. You can write a bash script to read the numbers and add them up...and you can also use perl, ruby, python, or any number of other languages.

Show us the sample input data, and what you're trying to accomplish, and what you've done/written on your own so far, and we can try to help.
 
Old 07-11-2014, 03:10 AM   #5
papori
LQ Newbie
 
Registered: Feb 2011
Posts: 23

Original Poster
Rep: Reputation: 0
I am looking for a way to calculate gini index uder linux - bash script will be the best..

Right now i am using CRAN package "ineq" for this calculation and the use is very simple, but i would prefer to not use R/perl/python in this script, because i dont have R in all the machines i want to use this.

I found many solution also with perl/python just by google it.

The kind of input that i have is vectors of numbers, each number in different line,usually 600 lines.
For example:
111
222
333
223
124
....
 
Old 07-11-2014, 09:57 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,617

Rep: Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963
Quote:
Originally Posted by papori View Post
I am looking for a way to calculate gini index uder linux - bash script will be the best..
Ok, so again...post what you have written/tried on your own so far, and tell us where you're stuck.
Quote:
Right now i am using CRAN package "ineq" for this calculation and the use is very simple, but i would prefer to not use R/perl/python in this script, because i dont have R in all the machines i want to use this.

I found many solution also with perl/python just by google it.
If you found many solutions using perl/python, why not use those instead of the R scripts, since you don't have R installed on all your machines?
Quote:
The kind of input that i have is vectors of numbers, each number in different line,usually 600 lines.
For example:
111
222
333
223
124
....
There are lots of examples about how to perform mathematical operations in bash, like this one:
http://linux.about.com/od/Bash_Scrip...ic-In-Bash.htm

Again, please post what you've written/tried of your own, and tell us where you're stuck.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: ActiveState Launches Python Package Manager Index (PyPM Index) LXer Syndicated Linux News 0 11-03-2010 03:40 PM
How to change the default webpage configuration from index.php to index.htm, etc meema Linux - Server 4 08-22-2008 09:06 PM
apache index.html doesn't show up but index.php do zoffmann Linux - Server 5 01-28-2008 03:53 PM
Where to put index.php (or index.html) on Slackware 11.0 moonguide Slackware 3 05-08-2007 06:35 PM
Gini listening with xmms Cornholio Linux - Software 0 03-26-2005 05:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration