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

2015-08-11 Thread Joshua Ulrich
On Mon, Aug 10, 2015 at 10:18 PM, Glenn Schultz wrote: > 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().

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 Eddelbuette

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

2015-08-10 Thread Dirk Eddelbuettel
On 11 August 2015 at 02:09, Glenn Schultz wrote: | 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.   Nothing wrong with connections. Many of us u

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 p

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 app

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 wrote: > O

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 wrote: > > On Sun, Aug 9, 2015 at 8:59 AM, Glenn Schultz wrote: >> Hi All, >> >> I use connections to open and close data folders needed by my package. >> A

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

2015-08-09 Thread Joshua Ulrich
On Sun, Aug 9, 2015 at 8:59 AM, Glenn Schultz 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 3 > (/Library/

[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 (/Library/Frameworks/R.framework/Versions/3.2/Resources/library/BondLab/