Displaying 20 results from an estimated 2000 matches similar to: "R --interactive and readline() creates infinite loop"
2009 Feb 04
2
Capturing all warnings (with messages)
Dear all,
For an open-source project that I'm working on (1), which uses R for
all its heavy lifting but includes a wrapper shell script, I was
hoping to find a way to capture all warnings (and, in fact, errors
too), and handle them in my own way. I realise I can do this for a
single expression using something like:
> f <- function(w) print(w$message)
>
2009 Aug 11
1
readBin() arg check has unnecessary overhead (patch included)
Dear all,
The version of readBin() in R-devel includes a use of match(), through
`%in%`, which can affect its performance significantly. By using
primitives instead of the rather expensive call to match(), I reduce
the time spent inside readBin() by more than 30% in some of my code
(part of the tractor.base package). A simple patch that does this is
given below. This passes "make
2010 Jul 16
2
Creating an environment with attributes in a package
Dear all,
I am trying to create an environment object with additional attributes, viz.
Foo <- structure(new.env(), name="Foo")
Doing this in a standard session works fine: I get the environment
with attr(,"name") set as expected. But if the same code appears
inside a package source file, I get just the plain environment with no
attributes set. Using a non-environment
2011 May 04
1
General "nil" reference class object
Dear John and others,
I've been wondering about whether there's any way to indicate a "nil"
reference class object, which will represent "no value", and be tested
for, but not fail the internal type checking. NULL is the obvious
choice (or seems so to me), but can only be used if an explicit class
union is created:
> Foo <- setRefClass("Foo")
> Bar
2009 May 20
0
New package for medical image manipulation: tractor.base
Dear all,
The "tractor.base" package has recently been added to CRAN. This
package provides functions to read, write, visualise and manipulate
magnetic resonance images. The standard Analyze, NIfTI and DICOM file
formats are supported (read-only for DICOM), and all metadata is
stored with the image data internally. The code can be used to
visualise image slices or maximum intensity
2009 May 20
0
New package for medical image manipulation: tractor.base
Dear all,
The "tractor.base" package has recently been added to CRAN. This
package provides functions to read, write, visualise and manipulate
magnetic resonance images. The standard Analyze, NIfTI and DICOM file
formats are supported (read-only for DICOM), and all metadata is
stored with the image data internally. The code can be used to
visualise image slices or maximum intensity
2012 Apr 11
0
Significant updates to medical imaging packages: TractoR and RNiftyReg
Dear all,
There have been some recent major updates to the TractoR and RNiftyReg
packages, which are available for medical image analysis applications.
If you use R for these purposes, I hope you will find the updates
useful.
RNiftyReg is an image registration package, which provides a clean
R-like interface to the NiftyReg library developed at University
College London [1]. It is aimed at
2012 Apr 11
0
Significant updates to medical imaging packages: TractoR and RNiftyReg
Dear all,
There have been some recent major updates to the TractoR and RNiftyReg
packages, which are available for medical image analysis applications.
If you use R for these purposes, I hope you will find the updates
useful.
RNiftyReg is an image registration package, which provides a clean
R-like interface to the NiftyReg library developed at University
College London [1]. It is aimed at
2015 Jul 28
2
all.equal: possible mismatch between behaviour and documentation
Dear all,
The documentation for `all.equal.numeric` says
Numerical comparisons for ?scale = NULL? (the default) are done by
first computing the mean absolute difference of the two numerical
vectors. If this is smaller than ?tolerance? or not finite,
absolute differences are used, otherwise relative differences
scaled by the mean absolute difference.
But the actual behaviour
2008 Apr 28
4
R 2.7.0, match() and strings containing \0 - bug?
Hi,
A piece of my code that uses readBin() to read a certain file type is
behaving strangely with R 2.7.0. This seems to be because of a failure
to match() strings after using rawToChar() when the original was
terminated with a "\0" character. Direct equality testing with ==
still works as expected. I can reproduce this as follows:
> x <- "foo"
> y <-
2015 Jul 30
1
all.equal: possible mismatch between behaviour and documentation
Dear Jon,
thank you for raising the issue,
>>>>> Jon Clayden <jon.clayden at gmail.com>
>>>>> on Tue, 28 Jul 2015 12:14:48 +0100 writes:
> Sorry; minor clarification. The actual test criterion in the example I
> gave is of course abs((0.1-0.102)/0.1) < 0.01, not abs(0.1) < 0.01. In
> any case, this does not match (my reading of) the docs,
2012 Oct 23
1
Mirror of the R manuals with a new visual style
Dear all,
I've created a new mirror of the HTML versions of the main R manuals
at <http://r-manuals.flakery.org>. This mirror does not modify the
content of the manuals at all, but simply injects a new visual style
with the aim of making the text easier to read and navigate. It will
be updated after each release of R.
The code used to generate these versions is freely available at
2011 Sep 23
2
Issue with seek() on gzipped connections in R-devel
Dear all,
In R-devel (2011-09-23 r57050), I'm running into a serious problem
with seek()ing on connections opened with gzfile(). A warning is
generated and the file position does not seek to the requested
location. It doesn't seem to occur all the time - I tried to create a
small example file to illustrate it, but the problem didn't occur.
However, it can be seen with a file I use for
2007 Jan 26
1
readBin is much slower for raw input than for a file
Dear all,
I'm trying to write an efficient binary file reader for a file type
that is made up of several fields of variable length, and so requires
many small reads. Doing this on the file directly using a sequence of
readBin() calls is a bit too slow for my needs, so I tried buffering
the file into a raw vector and reading from that ("loc" is the
equivalent of the file pointer):
2007 Jan 26
1
readBin is much slower for raw input than for a file
Dear all,
I'm trying to write an efficient binary file reader for a file type
that is made up of several fields of variable length, and so requires
many small reads. Doing this on the file directly using a sequence of
readBin() calls is a bit too slow for my needs, so I tried buffering
the file into a raw vector and reading from that ("loc" is the
equivalent of the file pointer):
2007 Dec 19
1
Standard input and R
Dear all,
I am trying to wrap a *nix shell script around R for a particular
purpose, for which I need to get R to execute predetermined commands
but retain interactivity and allow user input during their execution.
A straight redirection of standard input is therefore not appropriate,
and I don't think "littler" is the solution because I don't want to
write an
2014 Mar 24
1
Timezone warnings on package install in R-alpha
Dear all,
As of the current R alpha release, I'm seeing timezone-related warnings on
installing any package (including the recommended ones), which I haven't
seen before. For example,
[~/Documents/Source/R-alpha]$ bin/R CMD INSTALL ~/git/tractor/lib/reportr
* installing to library '/Users/jon/Documents/Source/R-alpha/library'
* installing *source* package 'reportr' ...
2012 Dec 03
1
Compilation failure on Solaris: any advice?
Dear all,
The current version of my RNiftyReg package is failing to compile on CRAN's
Solaris testbed, but I don't have access to a Solaris system to debug on,
and Googling the error hasn't been very helpful. The error is
CC -library=stlport4 -I/home/ripley/R/cc/include -DNDEBUG -DNDEBUG
-DRNIFTYREG -I/usr/local/include -KPIC -O -xlibmil -xtarget=native
-nofstore -c niftyreg.cpp
2011 Mar 29
2
Reading 64-bit integers
Dear all,
I see from some previous threads that support for 64-bit integers in R
may be an aim for future versions, but in the meantime I'm wondering
whether it is possible to read in integers of greater than 32 bits at
all. Judging from ?readBin, it should be possible to read 8-byte
integers to some degree, but it is clearly limited in practice by R's
internally 32-bit integer type:
2004 May 05
4
Cisco 7905 vs Cisco 7905-G
Hey,
Can anyone comment on the difference between the 7905 and it's upgrade, the
7905-G ? Has anyone used these phones in a configuration? Is SIP well
implemented in the 7905 ?
Thanks in advance,
Mat