pxR icon indicating copy to clipboard operation
pxR copied to clipboard

Added a text argument to read.px to allow parsing a PX file from text

Open ofurkusi opened this issue 4 years ago • 0 comments

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)

ofurkusi avatar Dec 03 '21 17:12 ofurkusi