search for: testattribute

Displaying 4 results from an estimated 4 matches for "testattribute".

2008 Nov 09
1
attr.all.equal() and all.equal(attributes(), attributes())
...ising behaviour of attr.all.equal(). With identical attributes I receive the answert NULL. If the attributes differ, the answer is as expecxted and differences are shown. all.equal(attributes(), attributes()) instead returns TRUE, if attributes are equal. See example: v <- 1:5 attr(v, 'testattribute') <- 'testattribute v' v_c <- v attributes(v) $testattribute [1] "testattribute v" attributes(v_c) $testattribute [1] "testattribute v" all.equal(v, v_c) [1] TRUE attr.all.equal(v, v_c) NULL << - - - - - - - - - - here is, what I don't expected all...
2005 Jul 18
1
levels() deletes other attributes
Dear All, it seems to me that levels() deletes other attributes. See the following example: ## example with levels f1 <- factor(c('level c','level b','level a','level c'), ordered=TRUE) attr(f1, 'testattribute') <- 'teststring' attributes(f1) levels(f1) <- c('L-A', 'L-B', 'L-C') attributes(f1) If I run it, after assigning new levels, the class is only "factor" instead of "ordered" "factor" and the $testattribute "teststring&quo...
2006 May 24
3
How to make attributes persist after indexing?
...rary attribute to be kept after indexing? This would be especially useful when indexing a data.frame. ## example for loss of attributes fx <- factor(1:5, ordered=TRUE) attr(fx, 'comment') <- 'Comment for fx' attr(fx, 'label') <- 'Label for fx' attr(fx, 'testattribute') <- 'just for fun' attributes(fx) # all attributes are shown attributes(fx[]) # all attributes are shown attributes(fx[1:5]) # only levels and class are shown attributes(fx[1]) # only levels and class are shown Thanks, Heinz T?chler
2012 Nov 23
14
extended attributes wiredness
Hi, I am using kernel 3.7-rc6. I have written a test application for extended attributes and have for some folders a wired behaviour: #include <stdio.h> #include <string.h> #include <attr/xattr.h> char attrs[1024]; ssize_t attrslen; int i; char value[1024]; ssize_t valuelen; int main(int argc, char *argv[]) { if (argc != 2) { fprintf(stderr, "Syntax: testxattr