Blog Archives

Toy Example with GScholarScraper_3.1

August 24, 2012
By
Toy Example with GScholarScraper_3.1

A commentator on my blog brought up this nice idea of how to use the GScholarScraper function for bibliometrics..I altered the code a little bit which enables to set a year since when results should be returned and added a field to the output collectin...

Read more »

Web-Scraper for Google Scholar Updated!

August 22, 2012
By
Web-Scraper for Google Scholar Updated!

I have updated the Google Scholar Web-Scraper Function GScholarScaper_2 to GScholarScraper_3 (and GScholarScaper_3.1) as it was outdated due to changes in the Google Scholar html-code. The new script is more slender and faster. It returns a dataframe o...

Read more »

Tcl/Tk GUI Example with Variable Input by User

August 11, 2012
By
Tcl/Tk GUI Example with Variable Input by User

I recently used R with GUI-elements for the first time and browsed through the available online resources, but I didn't quite find what I was searching for: The user should be able to put in some variables and call a function with a button. In the end ...

Read more »

Use IUCN API with R & XPath

June 28, 2012
By
Use IUCN API with R & XPath

Thanks to a posting on R-sig-eco mailing list I learned of the IUCN-API. Here's a simple example for what can be done with it (output as pdf is HERE):require(XML)require(maptools)require(jpeg)input = "panthera-uncia"h <- htmlParse(paste("http://api....

Read more »

Avoid Overplotting of Text in Ordination Diagram

June 25, 2012
By
Avoid Overplotting of Text in Ordination Diagram

Referring to a recent posting on r-sig-eco mailing list I'll add this example to theBioBucket:library(vegan)library(vegan)data(dune)sol <- metaMDS(dune) # use ordipointlabel -# here is an example where I added cex according to species frequencies:pl...

Read more »

A Wrapper Function for Instant Package Installation / Loading

June 19, 2012
By

Since library() and require() only accept input with length(input) = 1 it is necessary to make repeated calls - this can be quite annoying.. So, HERE is a little wrapper function for convenient package installation / loading. It installs packages if th...

Read more »

FloraWeb Plant Species Report via R

June 10, 2012
By
FloraWeb Plant Species Report via R

For German-spoken users I added the function floraweb_scrape.R that allows you to conveniently collect species data and print to a PDF-file (see this example output). The function accesses data provided by the  web-site FloraWeb.de (BfN - Bundesministerium für Naturschutz).You can use it as an interactive version (RTclTk) which I have put to a Github repository

Read more »

Source R-Script from Dropbox

May 14, 2012
By
Source R-Script from Dropbox

A quick tip on how to source R-scripts from a Dropbox-account:(1) Upload the script.. (2) Get link with the "get link" option. The link should look like "https://www.dropbox.com/s/XXXXXX/yourscript.R"..(3) Grab this part "XXXXXX/yourscript.R" and paste...

Read more »

knitr-Example: Use World Bank Data to Generate Report for Threatened Bird Species

May 2, 2012
By
knitr-Example: Use World Bank Data to Generate Report for Threatened Bird Species

I'll use the below script that retrieves data for threatened bird species from the World Bank via its API and does some processing, plotting and analysis. There is a package (WDI) that allows you to access the data easily.# world bank indicators for sp...

Read more »

Playing with knitr: Create Report with Dynamic List

May 1, 2012
By
Playing with knitr: Create Report with Dynamic List

Here is a little toy example using knitr, LaTeX/MiKTeX and Google Docs.Say you had a list on Google Docs (say a list of attendants) and you want to print a report with it..Then see this example using this Rnw-file and the output...make the tex-file wit...

Read more »