Displaying 20 results from an estimated 500 matches similar to: "R 2.6.0 S4 data breakage, R _data_class(), class<-, etc."
2007 Apr 10
1
list/matrix chimera
Hi all,
If dimensions are added to a list, it will become a matrix-like hybrid
that calls itself a matrix, but returns lists for subset operations.
This was brought to my attention by a user that encountered such an
object and was quite confused by its behavior. Although I have not
found the code that created the object yet, I believe that code is
simply incorrect. Nevertheless, I wonder if
2013 Apr 26
1
RFC: R_data_class as part of the C-API
Hi,
In src/attrib.c, the comment for the function R_data_class is:
```
/* the S4-style class: for dispatch required to be a single string;
for the new class() function;
if(!singleString) , keeps S3-style multiple classes.
Called from the methods package, so exposed.
*/
SEXP R_data_class(SEXP obj, Rboolean singleString)
```
I am obviously writing this because I'd wish to see it
2005 Jul 20
1
(PR#8017) build of REventLoop package crashes with 2.1 due
In what way is this a bug in R? It looks like a bug in the package, and
as Defn.h is not part of R's API any packge using it is `at risk' (and
cannot be installed in a binary-only installation, or even an installed
version of R).
In particular, Defn,.h depends on config.h, and it seems you installed a
binary version of R and used separate sources. I would suggest building
R from
2007 Apr 18
1
undefined symbol: Rf_rownamesgets
I get the error
undefined symbol: Rf_rownamesgets
when I try to load my package, which include C++ code that calls that
function. This is particularly strange since the code also calls
Rf_classgets, and it loaded OK with just that.
Can anyone tell me what's going on?
For the record, I worked around this with the general purpose
attribute setting commands and R_RowNamesSymbol. I
2017 Nov 29
2
binary form of is() contradicts its unary form
Hi Mehmet,
On 11/29/2017 11:22 AM, Suzen, Mehmet wrote:
> Hi Herve,
>
> I think you are confusing subclasses and classes. There is no
> contradiction. `is` documentation
> is very clear:
>
> `With one argument, returns all the super-classes of this object's class.`
Yes that's indeed very clear. So if "list" is a super-class
of "data.frame" (as
2017 Nov 29
2
binary form of is() contradicts its unary form
Yes, data.frame is not an S4 class but is(data.frame())
finds its super-classes anyway and without the need to wrap
it in asS4(). And "list' is one of the super-classes. Then
is(data.frame(), "list") contradicts this.
I'm not asking for a workaround. I already have one with
'class2 %in% is(object)' as reported in my original post.
'is(asS4(object), class2)'
2005 Jul 19
0
build of REventLoop package crashes with 2.1 due tosyntax error in Defn.h (PR#8017)
Full_Name: Richard Boyce
Version: 2.1.-1
OS: Debian testing/unstable
Submission from: (NULL) (128.95.123.29)
While building a custom package using a modified version of Duncan's REventLoop
with R version 2.1 (Debian package r-base, r-base-dev) and R source from apt-get
source 2.1.1 I get the following error:
$ R CMD build vjREventLoop
* checking for file
2007 Mar 29
1
zlib+shlib issue with the official EL4 R binary
Hi,
I have got a curious issue with an R package which uses zlib, against
the official binary here:
http://cran.r-project.org/bin/linux/redhat/el4/i386/R-2.4.1-1.rh4AS.i386.rpm
on a Redhat EL4 i686 system.
The problem is that at the end of reading a gzip'ed file within my
C code, gzgetc() returns -1 (no more to read or error) but
gzeof() doesn't return true. Now one can probably jump to
2017 Nov 29
0
binary form of is() contradicts its unary form
Hi Herve,
Interesting observation with `setClass` but it is for S4. It looks
like `data.frame()` is not an S4 class.
> isS4(data.frame())
[1] FALSE
And in your case this might help:
> is(asS4(data.frame()), "list")
[1] TRUE
Looks like `is` is designed for S4 classes, I am not entirely sure.
Best,
-Mehmet
On 29 November 2017 at 20:46, Herv? Pag?s <hpages at
2002 Jan 02
1
Building R-1.4 on Tru64
Hello everyone,
I've just attempted to build R-1.4 on Compaq Tru64 (I'll enclose the
text from bug.report() from R-1.3.1 at the end.) The relevant part of
the log is below.
Any ideas?
gcc -shared -o methods.so do_substitute_direct.o
methods_list_dispatch.o method_meta_data.o slot.o -L/usr/local/lib
/usr/ucb/ld:
Warning: Unresolved:
TYPEOF
Rf_error
Rf_protect
Rf_substitute
2003 Dec 10
0
C++: SET_LENGTH() Over Many Iterations?
In a C++ extension to R (v 1.8.1), I've been experimenting with a
generic "push back" function to tack one value at a time onto the end
of an R vector created within the extension. After calling this
function a certain number of times Rgui.exe (I'm writing in Windows
using Visual Studio .NET 2003) will fail with an Access Violation,
which doesn't happen when I pre-allocate
2019 Jul 15
0
Convert STRSXP or INTSXP to factor
Hi Morgan,
So if the goal is output identical to calling factor, one thing youc an
do is construct and evaluate a call to the R-level factor function. That
would work and be guaranteed to meet your requirement.
The factor function is implemented with R code, without even any direct
calls down to C code, so there isn't any C level functionality already
there that you could try to hit
2019 Jul 11
2
Convert STRSXP or INTSXP to factor
Hi,
Using the R C PAI, is there a way to convert to convert STRSXP or INTSXP to
factor.
The idea would be to do in C something similar to the "factor" function
(example below):
> letters[1:5]
# [1] "a" "b" "c" "d" "e"
> factor(letters[1:5])
# [1] a b c d e
# Levels: a b c d e
There is the function setAttrib the levels of a SXP
2006 Oct 09
1
Discussion starter for package level Connection API
Thought I'd try and start a discussion. Feel free to jump in.
I guess R needs to strike the right balance between opening up the
internals to package writers and not allowing them to do bad things. My
first attempt at cracking this nut is to just memcpy() the Rconnection
and not allow access to the private stuff:
/* Alternative to allowing C code access to connection API. */
Rconnection
2006 Oct 02
0
2.3.1: interacting bugs in load() and gzfile() (PR#9271)
Hello,
If repeated calls are made to save() using the same pre-opened gzfile
connection to a file, and then the connection is closed, the objects
saved by the second and subsequent calls are not correctly restored by
repeated calls to load() with a new gzfile connection to the same file.
What follows are a session exposing the bugs, analysis (see ANALYSIS),
patches (see PATCHES), and a session
2016 Oct 24
3
typo or stale info in qr man
man for `qr` says that the function uses LINPACK's DQRDC, while it in
fact uses DQRDC2.
```
The QR decomposition of the matrix as computed by LINPACK or LAPACK.
The components in the returned value correspond directly to the values
returned by DQRDC/DGEQP3/ZGEQP3
```
2003 Dec 12
3
C++: Appending Values onto an R-Vector.
Hi folks. I posted this question a few days ago, but maybe it got lost
because of the code I included with it. I'm having a problem using the
SET_LENGTH() macro in an R extension I'm writing in C++. In a function
within the extension I use SET_LENGTH() to resize R vectors so as to
allow the concatenation of single values onto the vectors -- it's a
"push back" function to
2011 Jan 03
0
Using PCA to correct p-values from snpMatrix
Hi R-help folks,
I have been doing some single SNP association work using snpMatrix. This works
well, but produces a lot of false positives, because of population structure in
my data. I would like to correct the p-values (which snpMatrix gives me) for
population structure, possibly using principle component analysis (PCA).
My data is complicated, so here's a simple example of what
2015 Feb 02
0
updated R-cairo bridge, official R-3.1.*-mavericks.pkg crippled, snpMatrix 1.19.0.20
The windows replacement is
R-library-grDevices-libs-winCairo_20150122.zip
in
http://sourceforge.net/projects/outmodedbonsai/files/R/
The cairo replacements are just two bundles, windows or OS X - containing
replacements for R 2.15.3, 3.0.3 and 3.1.2. You just extract the relevant one
for your R version.
The windows builds of R packages snpStats x.x.x.8 and snpMatrix 1.19.0.20
were done with
2015 Jan 21
0
updated R-cairo bridge, official R-3.1.*-mavericks.pkg crippled, snpMatrix 1.19.0.20
R.framework-Versions-Resources-library-grDevices-libs-cairo_20150120.tgz in
http://sourceforge.net/projects/outmodedbonsai/files/R/
are dropped in replacement to the cairo.so's in the official R binaries (2.15.3, 3.0.3, 3.1.2).
updated to cairo-1.12.18 and freetype-2.5.4. The official R binaries' were
built with early freetype 2.4.x and cairo 1.11(?) and had a number of issues
with some