Archives for posts with tag: CRAN

Tdoday I made a new release, version 0.2-9. There were some substantial changes under the hood regarding the vignette, but nothing that justified a minor version increase for users. Looking forward to your comments!

Excerpt from the NEWS file:

Changes in sos4R Version 0.2-9 – 2012-08-08

  • ADDED error handling for plotting methods so that plot(sos) does not break if one offering cannot be coerced to spatial
  • ADDED ‘ug/m3’ and ‘http://www.opengis.net/def/property/OGC/0/FeatureOfInterest’ to known list of fields > converted with sosConvertDouble and sosConvertString respectively
  • FIXED weathersos demo
  • MOVED vignette to now suggested directory vignettes/, see http://cran.r-project.org/doc/manuals/R-exts.html#Writing-package-vignettes
  • CHANGED DESCRIPTION file: moved xtable to Suggests – section, set ByteCompile: TRUE, added Authors@R (http://journal.r-project.org/archive/2012-1/RJournal_2012-1_Hornik~et~al.pdf), changed minumum R version to 2.14.0
  • UPDATED cheat sheet and vignette: added link to Bugzilla
  • ADDED minor improvements for sensor description parsing and coecion: sosCoordinates(SensorML) tries to handle ‘easting’/’northing’, ‘longitude’/’latitude’, and ‘elevation’/’altitude’ coordinates and subsequently plotting does not break if ‘x’/’y’ are not given.
  • ADDED function to reset the parsers to default: sos <- SosResetParsingFunctions(sos)

CRAN also had some new policies – well, new to me at least – which caused the process to be more labour-intensive, sadly not only for me. So don’t forget to check http://cran.r-project.org/web/packages/policies.html before submitting!

Download the package from CRAN now :-).

The release 0.2 was supposed to be a major improvement, but there were some problems with the Vignette, still. Mainly because it relied on downloading files from web servers, which again and again caused the package to get warnings on CRAN. Now, the vignette contains an option to rely on files stored in the folder along with it – I honestly doubt that this is a good practice, but I couldn’t find a better solution so far.

But of course there also was a bug introduced with some changes that were supposed to be  bug fixes in version 0.2 and 0.2-01 … anyway, here is an updated package: release 0.2-2, now on CRAN. I am very glad to actually have decent results in the checks across several systems.

From the CHANGES file:
* Fixed in sosGetCRS(...) which breaks if there is no bounding box given in an offering, broke even plot funktion.
* Extended saveOrginal parameter, now it also accepts file names to be used for the document to be saved.
* Extended parsing of SensorML, adding slots for all parsed elements
* Added parsing of exception reports to parseFile(...)
* Based vignette completely on dowloaded files for releases

* Added rudimentary support for KML responses (no parsing)
* Changed parser detection, now uses mime type, too. This changes parser exchangeability for known mime types!
* Added attribute to observations (if response is saved) with file name (sosAttributeFileName)
* Added %\VignetteDepends{xtable} to vignette and depedency xtable as well - got NOTEd for that in R 2.13 checks

With the new release version 0.1-10 the package sos4R is now available on CRAN:

http://cran.r-project.org/web/packages/sos4R/

With the vignette finally finished to a reasonable state, I felt it was time to do the next important step in writing R packages. The package was also tested with the current R release 2.12. So go ahead an try it out – installation just became a lot easier, documentation became a lot better.

# go to R console:
install.packages("sos4R")
library("sos4R")
vignette("sos4R")

But as documentation is never actually finished, please let me know if you find errors or missing elements, especially when accessing descriptions of individual functions etcetera apart from the vignette.

I will also decide in the future how the download section on this website is maintained: Keep a mirror? Use it for minor fixes that have to be out fast? Just use the archive? Abandon it? We will see.

The idea of reproducibility in research is fundamental, and I’d like to share some links if you haven’t heard of reproducible research yet:

If you want to get into it then R is a great choice because it is already fit for reproducible research. Just go to CRAN and check out the task view on reproducible research.

The original idea behind sos4R was very much inspired by the chance to use near-real time information and still allow reproducibility. If you think about using sos4R but don’t have high experiences with OGC Sensor Observation Services (SOS), let me know – I’m looking for good use cases for demos and publication.

I tried to find a nice solution for cross building my package for different platforms – well, for Windows mostly. I do not want to dig into R source code or compile R myself and stuff like that. Luckily, I found a good looking explanation shot explanation on the page for contributed documentation, but sadly I did not (!) get it to work. It is called “Building Microsoft Windows Versions of R and R packages under Intel Linux” by Jun Yan and A. J. Rossini, and comes with a PDF and a makefile. But the latter relies on resources that are no longer available online. That would/could have been great… I wrote an Email to the authors, but I did not get any response in the last two weeks. I don’t recommend to spend time on that.

Any suggestions? Anyone?

So, eventually I just compile my releases on Windows. I will also try to publish the package on CRAN sooner than later, but I would really like to have some more documentation (meaning a proper Vignette) and a little bit more testing (meaning other people trying it).

[Edit: I found win-builder, a website for building and checking R source packages for Windows, and it seems to work just fine!]