Hello,
A post to R-Help by Oliver Soong reports what seems to be a bug specific
to Windows (I'm on Windows 7).
The original post is as follows:
from: Oliver Soong
to: r-help
date: Fri, 7 Dec 2012 22:07:49 -0800
subject: [R] fil
Sorry, forgot the session info.
> sessionInfo()
R version 2.15.2 (2012-10-26)
Platform: i386-w64-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=Portuguese_Portugal.1252 LC_CTYPE=Portuguese_Portugal.1252
[3] LC_MONETARY=Portuguese_Portugal.1252 LC_NUMERIC=C
[5] LC_TIME=Portuguese_Portugal.1252
att
On 12-12-08 6:38 AM, Rui Barradas wrote:
Hello,
A post to R-Help by Oliver Soong reports what seems to be a bug specific
to Windows (I'm on Windows 7).
The original post is as follows:
I see the bug, and will fix it.
Duncan Murdoch
--
Hi everybody,
here's my problem:
i call a C function which calculates a large number of double values and
puts them into an array which is passed from R as a parameter in the
function (like .C("function", other parameters, result = as.double( c ( 1
: quantity ) ).
When the values come back to
Hello,
The double in R and the double in C are the same type, with the same
number of decimals (64 bits), so it's not because the numbers are too long.
Try calling .C("function", other parameters, result = double(quantity)).
Or maybe the error is in the C code, of which we know nothing about.
That is great example of why folks should NOT use the .C() interface.
Rcpp can help here, __even if you do not use any Rcpp language features__.
Below is a showcase for the recent sourceCpp() function which takes a C++
file (shown below), converts it and optionally runs the embedded R
code. Think
PkgA wishes to write a method for 'unique' on S4 class 'A'. ?Methods indicates
that one should
setGeneric("unique")
setClass("A")
unique.A <- function(x, incomparables=FALSE, ...) {}
setMethod(unique, "A", unique.A)
Both S3 and S4 methods need to be exported in the NAMESPACE
import(