Re: [R-pkg-devel] Working with connections - What is correct?

2015-08-10 Thread Glenn Schultz
Hi Dirk, Thanks for your response, I get the point on return(). For me, it is a security blanket - I just need to let that go rather than justify keeping it. I will refactor the connections and just get comfortable without return(). Thanks, Glenn  On Aug 10, 2015, at 09:59 PM, Dirk

Re: [R-pkg-devel] Working with connections - What is correct?

2015-08-10 Thread Glenn Schultz
All, Is my function just plain wrong or is it just programming style?  I use connections because SODA (software for data analysis) recommends using connections when working with serialized files.   First, after researching the use of return() - following Joshua's comment and others I found a

Re: [R-pkg-devel] Working with connections

2015-08-09 Thread Hadley Wickham
Also it's a little strange to put an RDS file _inside_ a gz, since normally the compression is done internally. And are you sure you should be exposing this data via a function, rather than using the regular package data mechanism? Hadley On Sun, Aug 9, 2015 at 7:04 AM, Joshua Ulrich

Re: [R-pkg-devel] Working with connections

2015-08-09 Thread Glenn Schultz
Hi Joshua, Thank-you. I did not realize that the call to return closed the connection -Glenn On Aug 9, 2015, at 9:04 AM, Joshua Ulrich josh.m.ulr...@gmail.com wrote: On Sun, Aug 9, 2015 at 8:59 AM, Glenn Schultz glennmschu...@me.com wrote: Hi All, I use connections to open and close data

[R-pkg-devel] Working with connections

2015-08-09 Thread Glenn Schultz
Hi All,  I use connections to open and close data folders needed by my package.  After each function closes I get the following warnings (depending on the connection that has been opened). 10: closing unused connection 3

Re: [R-pkg-devel] Working with connections

2015-08-09 Thread Joshua Ulrich
On Sun, Aug 9, 2015 at 8:59 AM, Glenn Schultz glennmschu...@me.com wrote: Hi All, I use connections to open and close data folders needed by my package. After each function closes I get the following warnings (depending on the connection that has been opened). 10: closing unused connection

Re: [R-pkg-devel] Working with connections

2015-08-09 Thread Glenn Schultz
Hi Hadley, Thanks for answering.  I basically followed what was outlined in Software for Data Analysis.  Although, I must admit it was a little light in this area (about a paragraph).  I will have to do some additional reading/research on the RDS inside a gz issue.  If it is not the correct