Displaying 20 results from an estimated 6000 matches similar to: "Creating an environment with attributes in a package"
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
2008 Sep 24
2
R --interactive and readline() creates infinite loop
Dear all,
I have asked before, in R-help [1], about a way to create an
interactive session in which commands are taken from a file or
standard input - like R CMD BATCH but additionally allowing user input
- but there was no response to that question, and the workarounds that
I have found (using "expect", creating a temporary .Rprofile) are ugly
and problematic.
With the
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
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 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
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
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,
2011 Feb 16
1
Ignoring .Rprofile when installing a package
Dear all,
Is there a way to force R CMD INSTALL to ignore ~/.Rprofile and
similar? I presume it sources these startup files for a reason, but
I've found that it can cause confusion or problems. In particular, my
~/.Rprofile loads a few packages which I very frequently use, but this
stops me from installing new versions of their dependencies; viz.
$ R CMD INSTALL tractor.base
* installing to
2012 Mar 14
1
Dealing with printf() &c. in third-party library code
Dear all,
I recognise the reason for strongly discouraging use of printf() and
similar C functions in R packages, but I wonder what people do in
practice about third-party code which may be littered with such calls.
I maintain a package (RNiftyReg) which provides an R interface to a
third-party library which contains hundreds of calls to printf(...),
fprintf(stderr,...) and similar. It seems to
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 <-
2010 Oct 22
1
Reference classes
Dear all,
First, many thanks to John Chambers, and anyone else who was involved,
for the new support for "reference classes" in R 2.12.0. It's nice to
see this kind of functionality appear in a relatively R-like form, and
with the blessing of the core team. In some contexts it is undoubtedly
appealing to associate a set of methods with a class directly, rather
than defining a load
2012 Sep 23
2
Deciding CentOS version in live production environment
Hi,
Can someone please guide me in deciding which specific CentOS Linux
version viz 5.8 and 6.3 be used in Live production environment. Any
merits and demerits of using either of these versions.
Regards
Kaushal
2008 Apr 23
0
[LLVMdev] PATCH: Use size reduction -- wave2
On Apr 17, 4:12 am, Chris Lattner <sa... at nondot.org> wrote:
> On Apr 16, 2008, at 11:25 AM, Dan Gohman wrote:
>
> >> So, my idea is that these changes are performance neutral.
>
> I strongly agree with Dan that we need to measure performance to
> ensure there is no significant performance regression.
Dan, Chris,
finally I am in possession of hard performance data
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 17
2
[LLVMdev] PATCH: Use size reduction -- wave2
On Apr 16, 2008, at 11:25 AM, Dan Gohman wrote:
>> So, my idea is that these changes are performance neutral.
I strongly agree with Dan that we need to measure performance to
ensure there is no significant performance regression.
>> I hope that this is interesting, but I'd like to ask anybody who is
>> comfortable with performance testing to help provide some hard
2011 Apr 19
1
Boost library in R package.
Hi R package developers,
I would like to know whether anyone had experience using the C++ Boost
library within an R package, and how portable was the resulting package.
I am especially thinking of possible compiling problems on Windows and
Apple systems.
If anyone had any tips on how to render an R package using Boost
portable, that would be very much appreciated.
Thank you very much for
2011 Apr 19
1
Boost library in R package.
Hi R package developers,
I would like to know whether anyone had experience using the C++ Boost
library within an R package, and how portable was the resulting package.
I am especially thinking of possible compiling problems on Windows and
Apple systems.
If anyone had any tips on how to render an R package using Boost
portable, that would be very much appreciated.
Thank you very much for
2015 Jul 28
0
all.equal: possible mismatch between behaviour and documentation
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, and the result
is not `TRUE`.
Regards,
Jon
On 28 July 2015 at 11:58, Jon Clayden <jon.clayden at gmail.com> wrote:
> Dear all,
>
> The documentation for `all.equal.numeric` says