Skip to content

Instantly share code, notes, and snippets.

@edsonlira
Created December 15, 2011 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edsonlira/1481221 to your computer and use it in GitHub Desktop.
Save edsonlira/1481221 to your computer and use it in GitHub Desktop.
id pad pas frep peso imc estat cintura quadril rcq tr se si abd perc_g
1 16 67 57 60 24 155 78 98 0,79 30 30 30 41 25
2 68 115 71 53 20 162 69 91 0,75 22 14 12 30 17
3 132 71 67 61 25 154 80 96 0,83 31 14 20 34 20
4 114 68 63 72 26 164 82 104 0,86 34 28 29 31 24
5 59 111 71 49 21 152 72 92 0,78 26 23 20 28 20
6 171 87 61 79 32 155 99 112 0,88 41 42 39 39 30
7 126 80 94 56 25 148 71 93 0,76 27 25 23 31 22
8 74 122 49 21 152 80 96 0,83 31 15 29 25 21
9 74 124 59 65 21 172 77 103 0,74 29 17 14 23 18
10 118 71 55 65 23 167 76 95 0,86 19 11 10 16 14
11 163 90 66 55 26 145 86 97,2 0,97 28 30 30 46 25
12 82 129 64 56 23 156 74 98,6 0,75 26 15 16 28 18
13 67 109 69 54 22 155 71 89 0,79 21 22 24 30 20
14 67 97 69 48 20 152 74 89 0,85 25 13 20 38 20
15 77 138 78 62 21 169 76 97 0,82 23 24 22 40 25
16 188 113 80 54 23 152 83 96 0,86 24 25 26 30 21
17 126 72 73 48 19 153 74 93 0,79 21 24 25 30 21
18 80 153 78 95 35 164 104 121 0,88 34 35 29 35 26
19 112 65 70 57 25 149 82 94 0,87 29 24 20 30 20
20 109 77 68 56 23 153 78 97 0,8 19 22 25 29 20
21 112 75 69 84 32 162 94 120 0,78 35 32 45 51 30
22 120 91 79 63 25 156 82 103 0,79 26 30 23 26 21
23 80 123 100 62 24 159 75 101 0,74 34 36 25 34 25
24 82 135 86 62 26 154 77 96 0,8 28 26 25 40 23
25 79 117 69 64 22 170 76 100 0,76 22 19 26 32 20
26 82 123 73 71 25 173 89 101 0,9 27 29 23 31 22
27 89 108 73 47 20 153 71 90 0,78 17 17 20 31 18
28 64 112 59 62 25 157 70 98 0,7 22 20 18 32 19
29 82 130 66 67 26 158 93 107 0,86 28 30 38 40 26
30 71 122 80 53 22 155 65,2 100 0,65 15 14 10 13 13
31 68 116 72 54 21 157 79 93 0,84 23 19 21 25 19
32 134 83 78 66 26 157 87 103 0,84 40 37 26 44 28
33 72 99 76 61 28 150 89 101 0,88 29 34 35 56 29
34 82 151 69 51 20 156 88 97 0,82 32 25 20 36 23
35 23 70 74 50 21 154 76 92 0,82 20 14 26 25 19
36 75 128 62 62 20 173 103 0,66 24 16 15 30 18
37 73 125 72 57 24 154 74 97 0,76 21 18 18 26 18
38 125 80 74 78 32 155 94 108 0,87 37 36 36 51 30
39 65 110 66 49 20 153 68 87 0,7 19 11 10 24 14
40 132 92 70 74 164 88 101 36 26 25 38 24
41 114 68 68 46 20 150 70 87 0,8 22 26 17 38 21
42 83 153 63 22 166 86 94 0,91 28 30 35 34 25
43 166 107 57 84 34 156 105 110 0,8 25 24 36 40 24
44 114 76 56 61,5 24 159 75 96 0,7 25 19 19 35 20
45 82 131 67 57 21 161 79 99 0,79 25 16 18 20 17
46 73 120 61 46 152 67 87 0,77 18 17 12 24 16
av<-read.csv2("path\\avalia.csv")
av$pg_f<-ifelse(av$sexo=="masculino",
ifelse(av$perc_g<=15&av$perc_g<20),"normal",""),
ifelse(av$perc_g<=20&av$perc_g<25),"mod obeso",""),
ifelse(av$perc_g<=25&av$perc_g<30),"exc obeso",""),
ifelse(av$perc_g<=10&av$perc_g<15),"ideal",""),
ifelse(av$perc_g<=0&av$perc_g<10),"essencial",""),
ifelse(av$sexo=="feminino",
ifelse(av$perc_g<=25&av$perc_g<30),"normal",""),
ifelse(av$perc_g<=30&av$perc_g<35),"mod obeso",""),
ifelse(av$perc_g<=35&av$perc_g<40),"exc obeso",""),
ifelse(av$perc_g<=14&av$perc_g<18),"ideal",""),
ifelse(av$perc_g<=0&av$perc_g<14),"essencial","")
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment