Skip to content

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

Open
ofurkusi wants to merge 1 commit intocjgb:masterfrom
ofurkusi:master
Open

Added a text argument to read.px to allow parsing a PX file from text#11
ofurkusi wants to merge 1 commit intocjgb:masterfrom
ofurkusi:master

Conversation

@ofurkusi
Copy link

@ofurkusi ofurkusi commented Dec 3, 2021

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments