similar to: problems with connections when applied in tryCatch

Displaying 20 results from an estimated 8000 matches similar to: "problems with connections when applied in tryCatch"

2018 May 03
0
download.file does not process gz files correctly (truncates them?)
Dear all, I've been diving a bit deeper into this per request of Tomas Kalibra, and found the following : - the lock on the file is only after trying to read it using oligo, so that's not a R problem in itself. The problem is independent of extrenal packages. - using Windows' fc utility and cygwin's cmp utility I found out that every so often the download.file() function inserts
2018 May 03
0
download.file does not process gz files correctly (truncates them?)
Using the correct mode absolutely solves it. Apologies for not trying the obvious. Cheers Joris On Thu, May 3, 2018 at 2:10 PM, Martin Morgan <martin.morgan at roswellpark.org > wrote: > > > On 05/02/2018 03:21 PM, Joris Meys wrote: > >> Dear all, >> >> I've noticed by trying to download gz files from here : >>
2018 May 03
0
download.file does not process gz files correctly (truncates them?)
Use mode="wb" when you download the file. See https://github.com/HenrikBengtsson/Wishlist-for-R/issues/30. R core, and others, is there a good argument for why we are not making this the default download mode? It seems like a such a simple fix to such a common "mistake". Henrik On Thu, May 3, 2018, 00:44 Joris Meys <jorismeys at gmail.com> wrote: > Dear all, >
2017 Dec 14
2
cannot destroy connection (?) created by readLines in a tryCatch
Consider this code. This is R 3.4.2, but based on a quick look at the NEWS, this has not been fixed. tryCatch( readLines(tempfile(), warn = FALSE)[1], error = function(e) NA, warning = function(w) NA ) rm(list=ls(all.names = TRUE)) gc() showConnections(all = TRUE) If you run it, you'll get a connection you cannot close(), i.e. the last showConnections() call prints: ?
2017 Dec 15
1
cannot destroy connection (?) created by readLines in a tryCatch
Thanks for tracking this down. Yeah, I should use suppressWarnings(), you are right. Although, readLines() might throw another warning, e.g. for incomplete last lines, and you don't necessarily want to suppress that. TBH I am not sure why that warning is given: ? con <- file(tempfile()) ? open(con) Error in open.connection(con) : cannot open the connection In addition: Warning message: In
2018 May 02
7
download.file does not process gz files correctly (truncates them?)
Dear all, I've noticed by trying to download gz files from here : https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSM907811 At the bottom one can download GSM907811.CEL.gz . If I download this manually and try oligo::read.celfiles("GSM907811.CEL.gz") everything works fine. (oligo is a bioConductor package) However, if I download using download.file("
2017 Dec 14
4
cannot destroy connection (?) created by readLines in a tryCatch
On Thu, Dec 14, 2017 at 7:56 PM, Gabriel Becker <gmbecker at ucdavis.edu> wrote: > Gabor, > > You can grab the connection and destroy it via getConnection and then a > standard close call. Yeah, that's often a possible workaround, but since this connection was opened by readLines() internally, I don't necessarily know which one it is. E.g. I might open multiple
2017 May 31
0
stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3
And with "equally spaced" I obviously meant "of equal size". It's getting too hot in the office here... On Wed, May 31, 2017 at 4:39 PM, Joris Meys <jorismeys at gmail.com> wrote: > Seriously, if a method gives a wrong result, it's wrong. line() does NOT > implement the algorithm of Tukey, even not after the patch. We're not > discussing Excel here,
2017 May 31
1
stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3
> On 31 May 2017, at 16:40 , Joris Meys <jorismeys at gmail.com> wrote: > > And with "equally spaced" I obviously meant "of equal size". It's getting > too hot in the office here... We have a fair amount of cool westerly wind up here that I could transfer to you via WWTP (Wind and Weather Transport Protocol). If you open up a sufficiently large pipe,
2017 Mar 28
0
`[` not recognized as a primitive in certain cases.
Thank you gents, I overlooked the subtle differences. On Tue, Mar 28, 2017 at 2:49 PM, Lukas Stadler <lukas.stadler at oracle.com> wrote: > ?typeof? is your friend here: > > > typeof(`[`) > [1] "special" > > typeof(mc[[1]]) > [1] "symbol" > > typeof(mc2[[1]]) > [1] "special" > > so mc[[1]] is a symbol, and thus not a
2010 May 08
2
apply a function on elements of a list two by two
Dear all, I want to apply a function to list elements, two by two. I hoped that combn would help me out, but I can't get it to work. A nested for-loop works, but seems highly inefficient when you have large lists. Is there a more efficient way of approaching this? # Make some toy data data(iris) test <- vector("list",3) for (i in 1:3){ x <- levels(iris$Species)[i] tmp
2005 Jun 29
2
"all connections are in use" error during lazyload stage of packa ge installation
Hi, I suddenly started getting strange errors while working on my caTools package: >RCMD install C:/programs/R/rw2011/src/library/caTools ...... preparing package caTools for lazy loading Error in file(file, "r", encoding = encoding) : all connections are in use Execution halted make: *** [lazyload] Error 1 *** Installation of caTools failed *** I searched
2017 May 18
0
[R] R-3.4.0 fails test
> On 18 May 2017, at 14:51, peter dalgaard <pdalgd at gmail.com> wrote: > > >> On 18 May 2017, at 13:47 , Joris Meys <jorismeys at gmail.com> wrote: >> >> Correction: Also dlt uses the default timezone, but POSIXlt is not recalculated whereas POSIXct is. Reason for that is the different way values are stored (hours, minutes, seconds as opposed to minutes
2017 May 18
0
[R] R-3.4.0 fails test
Correction: Also dlt uses the default timezone, but POSIXlt is not recalculated whereas POSIXct is. Reason for that is the different way values are stored (hours, minutes, seconds as opposed to minutes from origin, as explained in my previous mail) CHeers Joris On Thu, May 18, 2017 at 1:45 PM, Joris Meys <jorismeys at gmail.com> wrote: > This has to do with your own timezone. If I run
2015 Apr 01
0
evaluation in transform versus within
Thank you for the insights. I understood as much from the code, but I can't really see how this can cause a problem when using with() or within() within a package or a function. The environments behave like I would expect, as does the evaluation of the arguments. The second argument is supposed to be an expression, so I would expect that expression to be evaluated in the data frame first. I
2007 Jul 03
1
bug in closing gzfile-opened connections?
Hi, I am making multiple calls to gzfile() via read.table(), e.g. > x <- read.table( gzfile( "xxx.gz" ) ) After i do this many times (I haven't counted, but probably between 50 and 100 times) I get the error message: Error in open.connection(file, "r") : unable to open connection In addition: Warning message: cannot open compressed file 'xxx.gz' however, I
2015 Apr 01
1
evaluation in transform versus within
On 01/04/2015 2:33 PM, Joris Meys wrote: > Thank you for the insights. I understood as much from the code, but I > can't really see how this can cause a problem when using with() or > within() within a package or a function. The environments behave like > I would expect, as does the evaluation of the arguments. The second > argument is supposed to be an expression, so I
2018 Jan 31
0
Best practices in developing package: From a single file
Dear Dr. Pfaff, Thank you for this, creating a package out of single file was my oriingal question, but not only creating and also maintaining it that way so R package is an artifact of the development process rather than "manually maintained" structure. I will have look at your sources. Best, Mehmet S?zen <suzen at acm.org> On 31 January 2018 at 15:51, Pfaff, Bernhard Dr.
2017 May 23
1
help pages base R not rendered correctly?
Hi Duncan, that explains, thank you. If nobody finds the time to fix that, I might give it a shot myself this summer. Barbeque is overrated. Cheers Joris On Tue, May 23, 2017 at 3:10 PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > On 23/05/2017 8:39 AM, Joris Meys wrote: > >> Hi all, >> >> Don't know if this is a known issue, but I couldn't find
2017 May 18
2
[R] R-3.4.0 fails test
> On 18 May 2017, at 14:58 , Martyn Plummer <plummerM at iarc.fr> wrote: > > > >> On 18 May 2017, at 14:51, peter dalgaard <pdalgd at gmail.com> wrote: >> >> >>> On 18 May 2017, at 13:47 , Joris Meys <jorismeys at gmail.com> wrote: >>> >>> Correction: Also dlt uses the default timezone, but POSIXlt is not recalculated