Hello everyone, 
I have a file of type csv
It contains a set of values, and I try to rank you for these values , as in 
Excel(

   - Set ranking[0] to 1.
   - For each index i in the score-list 
      - If score[i] equals score[i-1] they should have same ranknig: 
         - ranking[i] = ranknig[i-1]
      - else the ranking should equal the current index: 
         - ranking[i] = i + 1 
         (+ 1 due to 0-based indecies and 1-based ranking)
      
and I tried some code
extensions [csv]
globals [data variable]
turtles-own [var ]

to setup
file-close-all
file-open "test1.csv"
;; read the data all at once by using csv:from-file
set data csv:from-file "test1.csv"
reset-ticks
end

to ranking
if file-at-end? [stop]
;; extract value from the list, using item 0 to remove the list, and just 
keep the value
set variable item 0 item ticks data


if ticks = length data [stop]

let rank-list sort-on [variable] turtles
let ranks n-values length rank-list [  ]
    (foreach rank-list ranks [ask ?1 [set variable 2] ] )
  tick

;show variable
end

, but I did not succeed with  netlogo(6.1)
any help plez

-- 
You received this message because you are subscribed to the Google Groups 
"netlogo-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to netlogo-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/netlogo-devel/f57ce446-8b18-4dc6-9029-49a4862d8498%40googlegroups.com.
145
136
132
76
91
122
130
114
74
98
109
94
62
75
89
67
85
114
72
68
110
70
67
61
59
64
42
75
44
42
46
28
67
46
35
34
84
66
30
40
53
42
26
29
40
14
34
30
40
29
33
53
21
27
30
34
24
17
16
11
30
28
30
18
24
21
19
26
22
17
20
35
24
18
14
22
18
18
22
4
23
16
9
15
16
19
12
18
16
15
17
12
11
16
15
21
11
9
12
14
15
4
14
13
8
11
11
9
12
15
15
11
10
7
11
10
9
8
8
8
4
19
7
7
9
7
9
9
12
6
5
10
7
5
4
7
6
7
5
7
14
5
8
7
7
9
6
8
9
7
4
5
8
4
2
8
9
8
11
7
5
4
2
5
5
7
3
6
3
14
8
5
6
5
7
3
4
5
11
6
4
13
6
2
14
3
4
11
2
7
6
6
13
5
7
10
5
3
4
4
3
2
2
3
4
7
2
3
4
5
7
5
6
6
3
1
8
9
2
3
4
2
3
4
4
2
5
7
4
4
6
2
2
6
2
1
1
4
4
3
2
14
5
2
2
2
2
3
2
2
2
2
1
48
1
1
3
2
2
3
2
1
3
3
3
2
2
4
1
5
4
2
1
5
2
4
1
1
2
2
2
2
1
2
2
3
3
5
1
4
1
4
1
3
1
2
1
2
2
7
2
2
1
2
1
2
1
1
2
1
1
1
5
2
2
1
1
2
2
1
5
5
2
3
1
2
3
3
3
9
1
3
1
1
3
3
2
1
2
4
6
2
1
3
3
2
4
2
5
3
4
1
2
3
4
1
1
1
4
3
2
3
1
3
1
1
2
2
1
2
2
2
3
1
1
1
4
3
2
3
4
2
2
3
2
1
2
1
2
3
2
3
2
4
4
3
3
1
3
1
3
5
4
2
4
2
2
2
3
2
2
2
1
2
3
6
2
3
2
2
2
3
6
2
2
1
2
1
2
2
2
1
2
3
3
3
5
2
2
2
3
3
3
4
2
3
3
2
2
4
3
2
1
2
2
3
2
1
1
2
1
1
1
3
2
1
1
1
1
1
1
2
1
1
1
2
1
1
2
2
1
3
4
3
3
1
4
5
4
1
3
3
5
1
1
2
3
2
2
1

Attachment: rank.nlogo
Description: Binary data

Reply via email to