rte-antares-rpackage / antaresViz

ANTARES Visualizations
https://rte-antares-rpackage.github.io/antaresViz
20 stars 12 forks source link

h5 : plot : est-ce qu'on peut diminuer le nombre cyclomatique ? #129

Closed jalazawa closed 2 weeks ago

jalazawa commented 7 years ago

pour info,

https://stackoverflow.com/questions/7041147/how-do-you-calculate-cyclomatic-complexity-for-r-functions

cyclocomp_package_dir(path = ".")

DONE (antaresViz)
                      name cyclocomp
21        plot.antaresData        77
22               plot.list        77
24         plot.simOptions        77
40                  tsPlot        77
25                 plotMap        64
12          exchangesStack        53
29               prodStack        51
5       changeCoordsServer        21
9       continuousColorPal        14
27           prettyNumbers         8
34              requireDep         5
38       setProdStackAlias         5
4              catColorPal         4
6           changeCoordsUI         4
23          plot.mapLayout         4
30        prodStackAliases         4
7              colorLegend         3
16       leafletDragPoints         3
28            prettyValues         3
39                tsLegend         3
3           barChartLegend         2
33 renderLeafletDragPoints         2
37        setInteractivity         2
1         addAntaresLegend         1
2               addShadows         1
8        colorScaleOptions         1
10      DEFAULT_CAT_COLORS         1
11         defaultTilesURL         1
13        getInteractivity         1
14          JS_resetLegend         1
15         JS_updateLegend         1
17 leafletDragPointsOutput         1
18         lineWidthLegend         1
19               mapLayout         1
20                  pkgEnv         1
26          plotMapOptions         1
31         prodStackLegend         1
32            radiusLegend         1
35        runAppAntaresViz         1
36           savePlotAsPng         1
41     updateAntaresLegend         1
jalazawa commented 7 years ago

Le référence

zoo package

PK ?

https://stats.stackexchange.com/questions/5418/first-r-packages-source-code-to-study-in-preparation-for-writing-own-package

Résultat

** R
** demo
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (zoo)
                        name cyclocomp
262                 read.zoo       160
268            rollapply.zoo        89
174                merge.zoo        86
244                 plot.zoo        77
335                   zooreg        55
190              na.fill.zoo        37
334                      zoo        33
256                rbind.zoo        27
119                dim<-.zoo        23
182            na.approx.zoo        22
197            na.spline.zoo        22
180        na.approx.default        20
7                      [.zoo        19
10                   [<-.zoo        18
125            frequency.zoo        17
273              rollmax.zoo        16
315               window.zoo        16
316             window<-.zoo        16
193                 na.locf0        15
320          xblocks.default        15
107           coredata<-.zoo        14
138           index<-.zooreg        14
311            time<-.zooreg        14
11             aggregate.zoo        13
26             as.matrix.zoo        12
88              axis.yearmon        12
90              axis.yearqtr        12
4                    $<-.zoo        11
192          na.locf.default        11
249                print.zoo        11
16         as.data.frame.zoo        10
141       index2char.numeric        10
150                  lag.zoo        10
195        na.spline.default        10
52      as.yearqtr.character         9
87              autoplot.zoo         9
118                 diff.zoo         9
147           is.regular.zoo         9
184 na.contiguous.data.frame         9
186        na.contiguous.zoo         9
14     as.data.frame.yearmon         8
15     as.data.frame.yearqtr         8
128          frequency<-.zoo         8
1                  -.yearmon         7
2                  -.yearqtr         7
151               lag.zooreg         7
163            make.par.list         7
209                  Ops.zoo         7
283           rollmedian.zoo         7
123           format.yearqtr         6
278             rollmean.zoo         6
288              rollsum.zoo         6
298               subset.zoo         6
37      as.yearmon.character         5
203          na.trim.default         5
221       panel.plot.default         5
3                      $.zoo         4
17                   as.Date         4
19                as.Date.ts         4
124              fortify.zoo         4
178     na.aggregate.default         4
297                  str.zoo         4
303              summary.zoo         4
312            transform.zoo         4
18           as.Date.numeric         3
20           as.Date.yearmon         3
21           as.Date.yearqtr         3
76                as.zoo.tis         3
86             as.zooreg.zoo         3
92               barplot.zoo         3
122           format.yearmon         3
130                 head.zoo         3
137              index<-.zoo         3
153                lines.zoo         3
200           na.StructTS.ts         3
307                 tail.zoo         3
22                as.list.ts         2
25               as.list.zoo         2
33                 as.ts.zoo         2
34              as.ts.zooreg         2
50        as.yearmon.yearqtr         2
77                 as.zoo.ts         2
83             as.zooreg.tis         2
84              as.zooreg.ts         2
108               cummax.zoo         2
109               cummin.zoo         2
110              cumprod.zoo         2
111               cumsum.zoo         2
114                cycle.zoo         2
115             cycle.zooreg         2
116               deltat.zoo         2
120                  end.zoo         2
131               ifelse.zoo         2
148        is.regular.zooreg         2
154               llines.its         2
155               llines.tis         2
156               llines.zoo         2
157              lpoints.its         2
158              lpoints.tis         2
159              lpoints.zoo         2
160                ltext.its         2
161                ltext.tis         2
162                ltext.zoo         2
201          na.StructTS.zoo         2
205                names.zoo         2
206              names<-.zoo         2
207              Ops.yearmon         2
208              Ops.yearqtr         2
270                  rollmax         2
271          rollmax.default         2
272               rollmax.ts         2
275                 rollmean         2
276         rollmean.default         2
277              rollmean.ts         2
280               rollmedian         2
281       rollmedian.default         2
282            rollmedian.ts         2
285                  rollsum         2
286          rollsum.default         2
287               rollsum.ts         2
295                split.zoo         2
296                start.zoo         2
300          Summary.yearmon         2
302          Summary.yearqtr         2
310               time<-.zoo         2
318                write.zoo         2
321               xblocks.ts         2
322              xblocks.zoo         2
5                  [.yearmon         1
6                  [.yearqtr         1
8                 [[.yearmon         1
9                 [[.yearqtr         1
12      as.character.yearmon         1
13      as.character.yearqtr         1
23           as.list.yearmon         1
24           as.list.yearqtr         1
27        as.numeric.yearmon         1
28        as.numeric.yearqtr         1
29        as.POSIXct.yearmon         1
30        as.POSIXct.yearqtr         1
31        as.POSIXlt.yearmon         1
32        as.POSIXlt.yearqtr         1
35             as.vector.zoo         1
36                as.yearmon         1
38           as.yearmon.date         1
39           as.yearmon.Date         1
40          as.yearmon.dates         1
41        as.yearmon.default         1
42         as.yearmon.factor         1
43        as.yearmon.integer         1
44            as.yearmon.jul         1
45        as.yearmon.mondate         1
46        as.yearmon.numeric         1
47         as.yearmon.POSIXt         1
48             as.yearmon.ti         1
49       as.yearmon.timeDate         1
51                as.yearqtr         1
53           as.yearqtr.date         1
54           as.yearqtr.Date         1
55          as.yearqtr.dates         1
56        as.yearqtr.default         1
57         as.yearqtr.factor         1
58        as.yearqtr.integer         1
59            as.yearqtr.jul         1
60        as.yearqtr.mondate         1
61        as.yearqtr.numeric         1
62         as.yearqtr.POSIXt         1
63             as.yearqtr.ti         1
64       as.yearqtr.timeDate         1
65        as.yearqtr.yearqtr         1
66                    as.zoo         1
67         as.zoo.data.frame         1
68            as.zoo.default         1
69             as.zoo.factor         1
70                as.zoo.fts         1
71               as.zoo.irts         1
72                as.zoo.its         1
73             as.zoo.matrix         1
74               as.zoo.mcmc         1
75         as.zoo.timeSeries         1
78                as.zoo.xts         1
79                as.zoo.zoo         1
80             as.zoo.zooreg         1
81                 as.zooreg         1
82         as.zooreg.default         1
85             as.zooreg.xts         1
89              Axis.yearmon         1
91              Axis.yearqtr         1
93                 c.yearmon         1
94                 c.yearqtr         1
95                     c.zoo         1
96                 cbind.zoo         1
97                  coredata         1
98          coredata.default         1
99             coredata.irts         1
100             coredata.its         1
101              coredata.ts         1
102             coredata.zoo         1
103               coredata<-         1
104          coredata<-.irts         1
105           coredata<-.its         1
106            coredata<-.ts         1
112            cycle.yearmon         1
113            cycle.yearqtr         1
117            deltat.zooreg         1
121               facet_free         1
126         frequency.zooreg         1
127              frequency<-         1
129       frequency<-.zooreg         1
132                    index         1
133            index.default         1
134                 index.ts         1
135                index.zoo         1
136                  index<-         1
139               index2char         1
140       index2char.default         1
142       is.numeric.yearmon         1
143       is.numeric.yearqtr         1
144               is.regular         1
145       is.regular.default         1
146            is.regular.ts         1
149                   is.zoo         1
152                 lines.ti         1
164                    MATCH         1
165            MATCH.default         1
166           MATCH.timeDate         1
167              MATCH.times         1
168            MATCH.yearmon         1
169            MATCH.yearqtr         1
170             mean.yearmon         1
171             mean.yearqtr         1
172                 mean.zoo         1
173               median.zoo         1
175           months.yearmon         1
176           months.yearqtr         1
177             na.aggregate         1
179                na.approx         1
181             na.approx.ts         1
183         na.approx.zooreg         1
185       na.contiguous.list         1
187                  na.fill         1
188          na.fill.default         1
189               na.fill.ts         1
191                  na.locf         1
194                na.spline         1
196             na.spline.ts         1
198         na.spline.zooreg         1
199              na.StructTS         1
202                  na.trim         1
204               na.trim.ts         1
210                    ORDER         1
211              ORDER.chron         1
212              ORDER.dates         1
213            ORDER.default         1
214           ORDER.timeDate         1
215              ORDER.times         1
216          panel.lines.its         1
217          panel.lines.tis         1
218           panel.lines.ts         1
219          panel.lines.zoo         1
220        panel.plot.custom         1
222         panel.points.its         1
223         panel.points.tis         1
224          panel.points.ts         1
225         panel.points.zoo         1
226        panel.polygon.its         1
227        panel.polygon.tis         1
228         panel.polygon.ts         1
229        panel.polygon.zoo         1
230           panel.rect.its         1
231           panel.rect.tis         1
232            panel.rect.ts         1
233           panel.rect.zoo         1
234       panel.segments.its         1
235       panel.segments.tis         1
236        panel.segments.ts         1
237       panel.segments.zoo         1
238           panel.text.its         1
239           panel.text.tis         1
240            panel.text.ts         1
241           panel.text.zoo         1
242                  plot.ti         1
243                 plot.tis         1
245                points.ti         1
246               points.zoo         1
247            print.yearmon         1
248            print.yearqtr         1
250             quantile.zoo         1
251         quarters.yearmon         1
252         quarters.yearqtr         1
253            range.yearmon         1
254            range.yearqtr         1
255                range.zoo         1
257             read.csv.zoo         1
258            read.csv2.zoo         1
259           read.delim.zoo         1
260          read.delim2.zoo         1
261           read.table.zoo         1
263                  rev.zoo         1
264               rev.zooreg         1
265                rollapply         1
266        rollapply.default         1
267             rollapply.ts         1
269               rollapplyr         1
274                 rollmaxr         1
279                rollmeanr         1
284              rollmedianr         1
289                 rollsumr         1
290                scale.zoo         1
291          scale_x_yearmon         1
292          scale_x_yearqtr         1
293          scale_y_yearmon         1
294          scale_y_yearqtr         1
299          summary.yearmon         1
301          summary.yearqtr         1
304              Sys.yearmon         1
305              Sys.yearqtr         1
306                    t.zoo         1
308                 time.zoo         1
309                   time<-         1
313           unique.yearmon         1
314           unique.yearqtr         1
317                 with.zoo         1
319                  xblocks         1
323            xtfrm.yearmon         1
324            xtfrm.yearqtr         1
325                xtfrm.zoo         1
326               xyplot.its         1
327               xyplot.tis         1
328                xyplot.ts         1
329               xyplot.zoo         1
330                  yearmon         1
331            yearmon_trans         1
332                  yearqtr         1
333            yearqtr_trans         1