rte-antares-rpackage/antaresProcessing

addExportAndImport don't work with districts

jalazawa opened this issue · 4 comments

two bugs

> res4<-readAntares(mcYears = "all", select = c("Out_addExportAndImport"), areas = "all")
> names(res4)
 [1] "area"      "mcYear"    "timeId"    "time"      "day"       "month"    
 [7] "hour"      "import"    "export"    "capExport" "capImport"
> res4<-readAntares(mcYears = "all", select = c("Out_addExportAndImport"), districts  = "all", areas = "all")
> names(res4$districts)
[1] "district" "mcYear"   "timeId"   "time"     "day"      "month"   
[7] "hour"     "import"   "export"  
> names(res4$areas)
 [1] "area"      "mcYear"    "timeId"    "time"      "day"       "month"    
 [7] "hour"      "import"    "export"    "capExport" "capImport"
> res4<-readAntares(mcYears = "all", select = c("Out_addExportAndImport"), districts  = "all")
> names(res4$districts)
NULL

```

FIRST 

Columns "capExport" and "capImport" are not imported from readAntares for district even if I change alias Out_addExportAndImport for districts 

````R
pkgEnv$process$addExportAndImport$areas <- c("import",
                                             "export",
                                             "capExport",
                                             "capImport")

pkgEnv$process$addExportAndImport$districts <- c("import",
                                                 "export",
                                                 "capExport",
                                                 "capImport")

```

TWO 

When I tried to get only data for districts OR areas I got NULL

```R 

> res4<-readAntares(mcYears = "all", select = c("Out_addExportAndImport"), districts  = "all")
> names(res4$districts)
NULL
> class(res4$districts)
[1] "NULL"
> res4<-readAntares(mcYears = "all", select = c("Out_addExportAndImport"), areas  = "all")
> names(res4$areas)
NULL


```

Quand tu importes que un type de données (areas ou districts) c'est pas un antaresDataList qui est créé mais un antaresData (c'est pas dans res4$areas que tu as des champs mais dans res4).

Yes ! Il reste le un :-)

C'est fait

OK