Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upcoming package units causes errors in EmissV #22

Closed
edzer opened this issue Sep 11, 2018 · 1 comment
Closed

upcoming package units causes errors in EmissV #22

edzer opened this issue Sep 11, 2018 · 1 comment

Comments

@edzer
Copy link
Contributor

edzer commented Sep 11, 2018

I'm planning a new units submission to CRAN in about a week; it will break EmissV as of now.

Could you please look into this:

edzer@gin-edzer:/tmp/rdeps$ cat rdepends_EmissV.Rcheck/00check.log 
* using log directory/tmp/rdeps/EmissV.Rcheck* using R version 3.5.1 (2018-07-02)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* using option--no-vignettes* checking for fileEmissV/DESCRIPTION... OK
* this is packageEmissVversion0.664.7* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether packageEmissVcan be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents ofdatadirectory ... OK
* checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking examples ... ERROR
Running examples inEmissV-Ex.Rfailed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: emission
> ### Title: Emissions in the format for atmospheric models
> ### Aliases: emission
> 
> ### ** Examples
> 
> veiculos <- vehicles(example = TRUE)
using a example of vehicles (DETRAN 2016 data and SP vahicle distribution):
                             Category   Type Fuel        Use       SP      RJ
Light Duty Vehicles Gasohol   LDV_E25    LDV  E25  41 [km/d] 11624342 2712343
Light Duty Vehicles Ethanol  LDV_E100    LDV E100  41 [km/d]   874627  204079
Light Duty Vehicles Flex        LDV_F    LDV FLEX  41 [km/d]  9845022 2297169
Diesel Trucks               TRUCKS_B5 TRUCKS   B5 110 [km/d]   710634  165814
Diesel Urban Busses           CBUS_B5    BUS   B5 165 [km/d]   792630  184947
Diesel Intercity Busses       MBUS_B5    BUS   B5 165 [km/d]    21865    5101
Gasohol Motorcycles          MOTO_E25   MOTO  E25 140 [km/d]  3227921  753180
Flex Motorcycles               MOTO_F   MOTO FLEX 140 [km/d]   235056   54846
                                 MG      PR      SC
Light Duty Vehicles Gasohol 4371228 3036828 2029599
Light Duty Vehicles Ethanol  328895  228494  152709
Light Duty Vehicles Flex    3702131 2571986 1718932
Diesel Trucks                267227  185651  124076
Diesel Urban Busses          298061  207072  138392
Diesel Intercity Busses        8222    5712    3817
Gasohol Motorcycles         1213830  843285  563592
Flex Motorcycles              88390   61407   41040
> 
> EmissionFactors <- emissionFactor(example = TRUE)
using a example emission factor (values calculated from CETESB 2015):
                                      CO            PM
Light Duty Vehicles Gasohol  1.75 [g/km] 0.0013 [g/km]
Light Duty Vehicles Ethanol 10.04 [g/km] 0.0000 [g/km]
Light Duty Vehicles Flex     0.39 [g/km] 0.0010 [g/km]
Diesel Trucks                0.45 [g/km] 0.0612 [g/km]
Diesel Urban Busses          0.77 [g/km] 0.1052 [g/km]
Diesel Intercity Busses      1.48 [g/km] 0.1693 [g/km]
Gasohol Motorcycles          1.61 [g/km] 0.0000 [g/km]
Flex Motorcycles             0.75 [g/km] 0.0000 [g/km]
> 
> TOTAL  <- totalEmission(veiculos,EmissionFactors,pol = c("CO"),verbose = TRUE)
Total of CO : 1676996.43578795 t year-1 
> 
> grid   <- gridInfo(paste0(system.file("extdata", package = "EmissV"),"/wrfinput_d01"))
Grid information from: /tmp/rdeps/EmissV.Rcheck/EmissV/extdata/wrfinput_d01 
> shape  <- raster::shapefile(paste0(system.file("extdata", package = "EmissV"),"/BR.shp"))
> raster <- raster::raster(paste0(system.file("extdata", package = "EmissV"),"/dmsp.tiff"))
> 
> SP     <- areaSource(shape[22,1],raster,grid,name = "SP")
processing SP area ... fraction of SP area inside the domain = 0.955761973247402> RJ     <- areaSource(shape[17,1],raster,grid,name = "RJ")
processing RJ area ... fraction of RJ area inside the domain = 0.748007015306122> 
> e_CO   <- emission(TOTAL,"CO",list(SP = SP, RJ = RJ),grid,mm=28)
calculating emissions for CO using molar mass = 28 ...
Error in R_ut_remove_unit(name) : unknown unit name or symbol
Calls: emission -> remove_symbolic_unit -> R_ut_remove_unit
Execution halted
* checking for unstated dependencies intests... OK
* checking tests ... ERROR
  Runningtestthat.RRunning the tests intests/testthat.Rfailed.
Last 13 lines of output:
  Light Duty Vehicles Flex    3702131 2571986 1718932
  Diesel Trucks                267227  185651  124076
  Diesel Urban Busses          298061  207072  138392
  Diesel Intercity Busses        8222    5712    3817
  Gasohol Motorcycles         1213830  843285  563592
  Flex Motorcycles              88390   61407   41040
  vehicles:
    Category Type Fuel       Use       SP
  1       B5  LDV   NA 41 [km/d] 27332097
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 18 SKIPPED: 0 FAILED: 1
  1. Error: final emission works (@test-emission.R#21) 
  
  Error: testthat unit tests failed
  Execution halted
* checking PDF version of manual ... OK
* DONE
Status: 2 ERRORs
@Schuch666
Copy link
Collaborator

fixed and on CRAN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants