Added another slight fix for the R export script, addresses #151.