ropensci/neotoma — pull request #16 by gavinsimpson (2013-07-12 15:13:37+00:00)
Title: Myriad fixes to get neotoma to build & pass checks

Neotoma needed several fixes to get it to build and pass R CMD check on my Linux box.

1. There was a non-ASCII character in `R/get_contacts.R`.
2. A couple of files had conflict markers from the VCS. I was able to infer the intention as the conflicts were minor. Files affected `R/get_download.R`, `R/get_taxa.R`, `man/get_contacts.Rd`, and `man/get_contacts.Rd`
3. Finally, I'm not sure the intention here but several of the R files were referencing a variable `neotoma.form` in

if(class(aa) == 'try-error'){ output <- neotoma.form }

but this object was not defined. Looking back through the sources I noticed that some files had this

neotoma.form <- getForm(base.uri, .params = cl)
aa <- try(fromJSON(neotoma.form, nullValue=NA))

whereas in other files you'd inlined this to

aa <- try(fromJSON(getForm(base.uri, .params = cl), nullValue=NA))

However, with the latter, there now is no `neotoma.form` to reference in the check for class `"try-error"`. To fix this, I presumed that the intention of the code was to pass back the output of the `getForm()` call if the `fromJSON()` call failed. This may not be correct; you might have just wanted to pass `aa` on to `output` without further processing.

This is my first time doing any collaborative coding via GitHub so if I've misunderstood or made the wrong change let me know and I'll fix issues in my branch and send another pull request.

Cheers,

Gavin