Displaying 20 results from an estimated 50000 matches similar to: "By default, `names<-` alters S4 objects"
2017 Jun 06
2
surprisingly, S4 classes with a "dim" or "dimnames" slot are final (in the Java sense)
Hi,
It's nice to be able to define S4 classes with slots that correspond
to standard attributes:
setClass("A1", slots=c(names="character"))
setClass("A2", slots=c(dim="integer"))
setClass("A3", slots=c(dimnames="list"))
By doing this, one gets a few methods for free:
a1 <- new("A1", names=letters[1:3])
2017 Jun 06
1
surprisingly, S4 classes with a "dim" or "dimnames" slot are final (in the Java sense)
I've fixed this and will commit soon.
Disregard my dim<-() example; that behaves as expected (the class needs a
dim<-() method).
Michael
On Tue, Jun 6, 2017 at 5:16 AM, Michael Lawrence <michafla at gene.com> wrote:
> Thanks for the report. The issue is that one cannot set special attributes
> like names, dim, dimnames, etc on S4 objects. I was aready working on this
>
2017 Jun 06
0
surprisingly, S4 classes with a "dim" or "dimnames" slot are final (in the Java sense)
Thanks for the report. The issue is that one cannot set special attributes
like names, dim, dimnames, etc on S4 objects. I was aready working on this
and will have a fix soon.
> a2 <- new("A2")
> dim(a2) <- c(2, 3)
Error in dim(a2) <- c(2, 3) : invalid first argument
On Mon, Jun 5, 2017 at 6:08 PM, Herv? Pag?s <hpages at fredhutch.org> wrote:
> Hi,
>
>
2003 Dec 18
3
NA, deleting rows
Dear colleges,
I do not understand the following behaviour:
> aa <- data.frame(a1= 1:10, a2= c(rep(NA, 5), 1:5) )
> aa
a1 a2
1 1 NA
2 2 NA
3 3 NA
4 4 NA
5 5 NA
6 6 1
7 7 2
8 8 3
9 9 4
10 10 5
> aa[!aa$a2==1, ] # removing rows with a2==1
a1 a2
NA NA NA
NA.1 NA NA
NA.2 NA NA
NA.3 NA NA
NA.4 NA NA
7 7 2
8 8 3
9 9 4
10 10 5
I didn't
2011 Jul 26
2
Big data and column correspondence problem
Greetings,
I've been struggling for some time with a problem concerning a big database
that i have to deal with.
I'll try to exemplify my problem since the database is really big.
Suppose I have the following data:
AA = c(4,4,4,2,2,6,8,9)
A1 = c(3,3,5,5,5,7,11,12)
A2 = c(3,3,5,5,5,7,11,12)
A = cbind(A, A1, A2)
BB = c(2,2,4,6,6)
B1 =c(5,11,7,13,NA)
B2 =c(3,12,11,NA,NA)
B3
2017 Aug 25
2
retrieve machine password in current Samba?
We have a wireless network that uses 802.1x authentication, in which domain joined computers use their machine credentials to connect.
Windows machines do this automatically, and until recently Linux computers could join using wicd, wpa-supplicant, and a simple script that would retrieve the machine password with tdbdump.
( specifically tdbdump -k SECRETS/MACHINE_PASSWORD/DOMAIN
2009 Jun 02
2
formal argument "envir" matched by multiple actual arguments
Hi list,
This looks similar to the problem reported here
https://stat.ethz.ch/pipermail/r-devel/2006-April/037199.html
by Henrik Bengtsson a long time ago. It is very sporadic and
non-reproducible.
Henrik, do you remember if your code was using reg.finalizer()?
I tend to suspect it but I'm not sure.
I've been hunting this bug for months but today, and we the help of other
Bioconductor
2006 May 22
2
confused by inheritance...
Hi r-devels,
I am stuck in some S4 inheritance problem:
setClass("A",representation(a="numeric"))
setClass("A1",representation(b="numeric"),contains="A")
setClass("A2",representation(c="numeric"),contains="A1")
if(!isGeneric("foo")){
setGeneric("foo", function(x,y,z, ...)
2014 Mar 07
4
Cannot chain to another PXE server on the same subnet
On Fri, Mar 7, 2014 at 2:33 AM, Vieri <rentorbuy at yahoo.com> wrote:
> So I take it it's more of a DHCP hack in which:
> 1- client boots and gets DHCP response from 10.215.144.7 with PXE syslinux info
> 2- client loads pxelinux.0 menu and selects menu that chains to Altiris PXE menu except, instead of calling pxechain.com or pxechn.c32 with the Altiris server's IP address,
2012 Nov 22
1
ayuda con Merge
Estimados usuarios de R:
Tengo dos data frames, A y B, donde hay algunas variables comunes y otras
distintas.
En el A tengo las variables, a1, a2, a3, a4, a5.
En el B tengo las variables a1, a2, a3, b1, b2, b3,b4, b5, b6, b7.
Los valores llave son a1 y a2, al data frame B quiero pegarle las variables
a4 y a5 y en el caso no se tenga ningun valor en la variable a3, ponerle el
valor que aparece
2013 May 03
3
color by group in ggplot
Hey,
I have a dataset like this:
ID Var1 Var2 Group
A1 1 1 BB
A2 1 2 AA
B1 2 1 CC
B2 1 3 DD
C1 1 2 EE
I would like to plot the points of Var1 and Var2, use "ID" as X-axis, but
color the points by "Group". I can
2012 Nov 15
1
bug with mapply() on an S4 object
Hi,
Starting with ordinary vectors, so we know what to expect:
> mapply(function(x, y) {x * y}, 101:106, rep(1:3, 2))
[1] 101 204 309 104 210 318
> mapply(function(x, y) {x * y}, 101:106, 1:3)
[1] 101 204 309 104 210 318
Now with an S4 object:
setClass("A", representation(aa="integer"))
a <- new("A", aa=101:106)
> length(a)
2010 May 31
2
store and repeat data based on row names (loop, if statement)
Hello fellow R users,
I have an issue that has me a little confused - sorry if the subject makes
little sense, I wasn't sure how to refer to this problem. I have a data set
I've extracted from ArcInfo (a section is shown below). It is spatial data,
showing the distance from one ID to another. I want to get the actual 'TO'
ID from the data set (there is no easy way to do this in
2019 Jun 03
2
Question about a AA result and its use in Dependence Analysis
It seems the same bug is there if we do pointer swapping with selects. Do you agree? (see example below)
define void @f() {
entry:
%a1 = alloca float, align 4
%a2 = alloca float, align 4
br label %loop
end:
ret void
loop:
%phi = phi i32 [ 0, %entry ], [ 1, %loop ]
%select_cond = icmp eq i32 %phi, 0
%ptr1 = select i1 %select_cond, float* %a1, float* %a2
%ptr2 = select i1
2003 May 21
2
Access Object's Objects HELP
Dear WizaRds,
A run of nls produces the following concise summary:
> summary(cs.wt)
Formula: 0 ~ wt.MM(conc, time, A1, a1, A2, a2)
Parameters:
Estimate Std. Error t value Pr(>|t|)
A1 4.814e+02 2.240e+01 21.495 0.0296 *
a1 7.401e-01 7.435e-02 9.956 0.0637 .
A2 1.613e+02 1.738e+01 9.280 0.0683 .
a2 1.770e-02 7.324e-03 2.417 0.2497
2012 Mar 12
2
[LLVMdev] Assignment of large objects, optimization?
Hi,
My fronted generates (bad) code, which I see that LLVM is unable to optimize. For example, code similar to:
%a = type [32 x i16]
declare void @set_obj(%a*)
declare void @use_obj(%a*)
define void @foo() {
entry:
%a1 = alloca %a
%a2 = alloca %a
call void @set_obj(%a* %a2)
%a3 = load %a* %a2
store %a %a3, %a* %a1
call void @use_obj(%a* %a1)
ret void
}
(Or with load/store
2012 Mar 12
0
[LLVMdev] Assignment of large objects, optimization?
Hi Patrik,
> My fronted generates (bad) code, which I see that LLVM is unable to optimize.
> For example, code similar to:
> %a = type [32 x i16]
> declare void @set_obj(%a*)
> declare void @use_obj(%a*)
> define void @foo() {
> entry:
> %a1 = alloca %a
> %a2 = alloca %a
> call void @set_obj(%a* %a2)
> %a3 = load %a* %a2
> store %a %a3, %a* %a1
> call void
2010 Nov 16
2
Pass character vector to function argument
A bit embarrassed to post this seemingly trivial question, but I can't find anything in the archive that's quite relevant:
a1=1
a2=2
obs=objects(pattern=glob2rx("a?"))
I want to utilize 'obs' as a function argument to produce something like:
sum(a1,a2)
Obviously, sum(obs) doesn't work, but I've tried variations of 'eval', 'parse',
2010 Jan 20
2
could we use ":" to represent multiple matrice in a list or sequential chracter names
Hi,
I know we can use 1:10 to represent the 1,2,3,...,10 numbers, but the
following conditions are except.
Anybody knows how to represent the following two cases with similar usage
of ":" or others? Usually, i will get several hundred names for them, such
as a1,a2,... or f[[1]],f[[2]],...
#Example data
a1<-array(1:12,c(2,3,2)); a2<-array(2,c(2,3,2)); a3<-array(0,c(2,3,2))
2003 May 20
2
Extending %*%
I have lists of matrices stored in various ways. I'd like to extend
%*% to work on these. Is this possible, or should I create my own new
operator?
A simplified example would be as follows:
A <- list( A1, A2, A3)
B <- list( B1, B2, B3)
where A1,...,B3 are all matrices, and I'd like A %*% B to return
list( A1 %*% B1, A2 %*% B2, A3 %*% B3)
In the real case A and B are sometimes