pxR
pxR copied to clipboard
Added a text argument to read.px to allow parsing a PX file from text
The native read.table function, of which read.csv etc. are based, offer a text parameter where you can submit the file as text. This is convenient when e.g. reading a downloaded file directly. By adding this argument, read.px implements an interface closer to the ones of built in file readers in R.
With this change, reading a file from the web can be done like this:
req <- GET("http://www.example.com/file.px")
px_raw <- content(req, "text")
px <- read.px(text = px_raw)