I added the flag -fPIC to CALINE3_FFLAGS in CALINE3/src/Makevars, as suggested by the compiler;
tests on CALINE3:
test_dir("/home/giovanni/R/FVG/packages/CALINE3/inst/tests/")
CAL3CONC:
CAL3INTG:
rural curved: .............
single link: ..
urban freeway: ...............
For the urban freeway cases:
Some concentrations differ by < 0.1 ppm CO compared to CALINE3 User Guide.
Not sure if this is data input error, compiler differences, or something else.
Tests have not been written exactly against CALINE3 User Guide examples.
DONE ===============================================================================================================
(seems ok)
while
test_dir("/home/giovanni/R/FVG/packages/Rcaline/inst/tests/")
CALINE3-examples:
Error in UseMethod("Receptors") :
no applicable method for 'Receptors' applied to an object of class "c('matrix', 'double', 'numeric')"
Called from: Receptors(cbind(x = 30, y = 0), z = 1.8)
following https://github.com/holstius/Rcaline/blob/master/vignettes/SanFrancisco.Rmd, when I run this
pred_matrix <- predict(SF_model, units = "mg/m^3")
I got this message:
`Error in do.call("CALINE3_RECEPTOR_TOTALS", all_args) :
cannot find the function "CALINE3_RECEPTOR_TOTALS"
Called from: do.call("CALINE3_RECEPTOR_TOTALS", all_args)
Any idea?
Thank you!
R version 3.2.4 Revised (2016-03-16 r70336)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.4 LTS
locale:
[1] LC_CTYPE=it_IT.UTF-8 LC_NUMERIC=C LC_TIME=it_IT.UTF-8 LC_COLLATE=it_IT.UTF-8
[5] LC_MONETARY=it_IT.UTF-8 LC_MESSAGES=it_IT.UTF-8 LC_PAPER=it_IT.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=it_IT.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] Rcaline_1.2 testthat_1.0.2 rgeos_0.3-19 rgdal_1.1-10 CALINE3_1.2 sp_1.2-3
loaded via a namespace (and not attached):
[1] Rcpp_0.12.5 lattice_0.20-33 crayon_1.3.2 plyr_1.8.3 grid_3.2.4 R6_2.1.2
[7] gtable_0.2.0 magrittr_1.5 scales_0.4.0 ggplot2_2.1.0 tools_3.2.4 munsell_0.4.3
[13] colorspace_1.2-6
I've thrown up a pull request which fixes this issue, which I also came across. CALINE3_RECEPTOR_TOTALS doesn't exist in the CALINE3 package, but CAL3RXM and CAL3RXL do.
Dear David, I'm testing
Rcaline
andCALINE3
-fPIC
toCALINE3_FFLAGS
inCALINE3/src/Makevars
, as suggested by the compiler;(seems ok)
https://github.com/holstius/Rcaline/blob/master/vignettes/SanFrancisco.Rmd
, when I run thisAny idea? Thank you!