[R] use mathematics formula

From: elyakhlifi mustapha <elyakhlifi_mustapha_at_yahoo.fr>
Date: Wed, 16 May 2007 08:27:49 +0000 (GMT)


hello,
I wanna use some mathematics formula and to do this I tried several way in paricular using strsplit
textconnection
scan
setdiff
but I think that it's a lil hard
the data frame that I'm working on is as follow

> donCalcara2

   Id_Cara                                                                                                      Form_C
1      743                                              if C325=. then C743=(C152/C103)*100| else C743=(C152/C325)*100
2      627 if C137=. Then C627=.| else do| if C109=. Then C627=(C138/S138)*(100-C137)| else C627=(C138/S138)*C109| end
3      638                                                                                          C638 = C103 / S103
4      740                                              if C325=. then C740=(C346/C103)*100| else C740=(C346/C325)*100
5      739                                         if C155=. then C739=(C570/C103)*100| else C739=C155/(C155+C103)*100
6      628                                              if C325=. then C628=(C455/C103)*100| else C628=(C455/C325)*100
7      747                                                if C325=. then C747=(C27/C103)*100| else C747=(C27/C325)*100
8      629                                              if C325=. then C629=(C454/C103)*100| else C629=(C454/C325)*100
9      737                                              if C325=. then C737=(C457/C103)*100| else C737=(C457/C325)*100
10     750                                              if C325=. then C750=(C431/C103)*100| else C750=(C431/C325)*100
11     754                                       if C325=. then C754=(C894/C103)*100| else C754=(C894/(C325+C894))*100
12     760                                                                                           C760= C627 / 0.89
13     761                                                                                          C761 = C177 * 0.89
14     586                                                                         if C325=. then C586=(C588/C103)*100
15     896                                                                         if C325=. then C896=(C895/C103)*100
16     751                                              if C325=. then C751=(C433/C103)*100| else C751=(C433/C325)*100
17     738                                              if C325=. then C738=(C151/C103)*100| else C738=(C151/C325)*100
18     744                                                                                        C744=(C627*C177)/100
19     633                                              if C325=. then C633=(C130/C103)*100| else C633=(C130/C325)*100
20     732                                              if C325=. then C732=(C585/C103)*100| else C732=(C585/C325)*100
21     898                                                                         if C325=. then C898=(C897/C103)*100

Can you help me please?
I'm French so if you can speak French it's better for me because of my English level


        [[alternative HTML version deleted]]



R-help_at_stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 16 May 2007 - 08:36:34 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 16 May 2007 - 12:31:38 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.