similar to: Bug? assigning with operator '=' to local parameter changes object in global environment?

Displaying 20 results from an estimated 20000 matches similar to: "Bug? assigning with operator '=' to local parameter changes object in global environment?"

2002 Jun 12
1
identical calls are not equal !?
Can please someone familiar with the R internals enlighten me on the following strange observation: # this is IDENTICAL as expected identical(substitute(substitute()), substitute(substitute())) # but NOT EQUAL !???? substitute(substitute()) == substitute(substitute()) # I originally found it on t2 <- function(e){ substitute(e) } t2(substitute(x==y, list(y=y)))[1] # I would expect all
2002 Nov 07
1
language inconsistency puzzle (in the tradition of Bill V enables (Hi Bill) puzzle "what is x")
R allows you to dynamically extend a vector by assigning past the end. So if a has length 10, then assigning to a[11] creates also a[11] with value a2[11] NA. So a is now length 11, while a2 is still length 10. So the occurrence of a[11] has a different meaning on the assigned-to side than on the assigned-from side. E.g. >a <- rep(1,10) >b <- 11 >a2 <- a >a[b] <- a2[b]
2008 Nov 20
0
More list to vector puzzle
Many thanks for the answers on my previous question, it got me started. Indeed, stack() was the function I was vaguely remembering. However, I didn?t get very far because my data set is way more complicated then I expected. In fact I have a mixture of levels and lists within a list. Basically, it resemble the following list (named data) made of the levels H and the list of lists A and T. for each
2002 Jan 25
0
nested versus crossed random effects
Hi all, I'm trying to test a repeated measures model with random effects using the nlme library. Suppose I have two within subjects factors A, B both with two levels. Using aov I can do: aov.1 <- aov(y ~ A*B + Error(S/(A+B)) following Pinheiro and Bates I can acheive the analagous mixed-effects model with: lme.1 <- lme(y~A*B, random=pdBlocked(list(pdIdent(~1),pdIdent(~A-1),
2012 Apr 09
2
libusb_get_report: Unknown error
OS name and version: FreeBSD 9.0-RELEASE amd64 exact NUT version: 2.6.1 NUT installation method: >From ports collection (cd /usr/ports/sysutils/nut; make install) Exact device name and related information: American Power Conversion/Back-UPS ES 525 FW:851.t2.I USB FW:t2 Complete problem description: /usr/local/etc/rc.d/nut start Network UPS Tools - UPS driver controller 2.6.1 Network UPS
2012 Aug 14
2
Communative Matrix Multiplcation
Friends I'm not seeing why the following occurs: > T1 <- (A1 - A2) %*% D > T2 <- (A1 %*% D) - (A2 %*% D) > identical(T1, T2) [1] FALSE Harold > dput(A1) new("dsCMatrix" , i = c(0L, 1L, 2L, 3L, 0L, 1L, 4L, 2L, 3L, 5L) , p = c(0L, 1L, 2L, 3L, 4L, 7L, 10L) , Dim = c(6L, 6L) , Dimnames = list(NULL, NULL) , x = c(5, 5, 5, 5, 5, 5, 10, 5, 5, 10)
2002 Jun 24
1
problems with assigning a class to an environment
I was surprised to find that calling str() on an environment can remove attributes from it, as in > a <- new.env() > class(a) <- "jens" > class(a) [1] "jens" > str(a) Class 'jens' length 0 <environment> > class(a) NULL then I found in the R-Language-Manual in chapter 2.1.10 Environments the sentence: "In particular, assigning
2008 Jul 23
1
[LLVMdev] Extending vector operations
On 23-Jul-08, at 12:15 PM, David Greene wrote: > On Monday 21 July 2008 15:21, Stefanus Du Toit wrote: > >> We would like to extend the vector operations in llvm a bit. We're >> hoping to get some feedback on the right way to go, or some starting >> points. I had previously had some discussion on this list about a >> subset of the changes we have in mind. >
2012 Apr 20
2
[LLVMdev] CriticalAntiDepBreaker rewrites a register operand of a call instruction
I am running into a problem when I turn on post-RA scheduler with mode "ANTIDEP_CRITICAL" for mips. I'd appreciate if someone could explain what is going wrong here. This is the basic block before post RA scheduling (at PostRASchedulerList.cpp:322): *(gdb) #3 0x0000000000ed3d26 in runOnMachineFunction (this=0x20aa470, Fn=...) at lib/CodeGen/PostRASchedulerList.cpp:322 322
2002 Dec 09
0
Re: R-help digest, Vol 1 #10 - 6 msgs
°_§É§¿§¿ ----- Original Message ----- From: <r-help-request at stat.math.ethz.ch> To: <r-help at stat.math.ethz.ch> Sent: Sunday, December 08, 2002 7:00 PM Subject: R-help digest, Vol 1 #10 - 6 msgs > Send R-help mailing list submissions to > r-help at stat.math.ethz.ch > > To subscribe or unsubscribe via the World Wide Web, visit >
2013 Mar 05
0
chisq.test
If you wanted to do a t.test res1<-do.call(cbind,lapply(seq_len(nrow(m)),function(i) do.call(rbind,lapply(split(rbind(m[i,-1],n),1:nrow(rbind(m[i,-1],n))), function(x) {x1<- rbind(x,m[i,-1]); t.test(x1[1,],x1[2,])$p.value})))) ?res2<-do.call(cbind,lapply(seq_len(ncol(res1)),function(i) c(c(tail(res1[seq(1,i,1),i],-1),1),res1[-c(1:i),i]))) ?attr(res2,"dimnames")<-NULL ?res2
2003 Feb 03
1
summary.table bug in parameter (and fix) (PR#2526)
I sent this in with an old version, but it's in latest version as well. The fix is simple. In the summary.table function, the parameter is calculated incorrectly for a test of independence among all cells when the table is more than 2-way table. Example: Consider X: > X a b c 1 A1 B2 C1 2 A3 BA3 C2 3 A2 B1 C4 4 A1 B2 C3 5 A3 BA3 C2 6 A1 BA3 C1 7 A2 BA3 C2 8 A1
2017 Oct 11
1
[PATCH v1 01/27] x86/crypto: Adapt assembly for PIE support
Change the assembly code to use only relative references of symbols for the kernel to be PIE compatible. Position Independent Executable (PIE) support will allow to extended the KASLR randomization range below the -2G memory limit. Signed-off-by: Thomas Garnier <thgarnie at google.com> --- arch/x86/crypto/aes-x86_64-asm_64.S | 45 ++++++++----- arch/x86/crypto/aesni-intel_asm.S
2010 Jun 10
1
do faster ANOVAS
Dear all R users, I want to realize 800 000 ANOVAS and to store Sum of Squares of the effects. Here is an extract of my table data Product attribute subject rep t1 t2 t3 … t101 P1 A1 S1 R1 1 0 0 … 1 I want to realize 1 ANOVA per timepoint and per attribute, there are 101 timepoints and 8 attributes so I want to realize 808 ANOVAS. This will be an ANOVA with two factors : Here is one example:
2002 May 02
0
improving match.args()
Here is a suggestion for improving match.arg() Comments welcome. Best Jens Oehlschl?gel # up to now match.arg() works as t1 <- function( param = c("default", "alternative1", "alternative2") ){ param <- match.arg(param) param } # and args(t1) # > function (param = c("default", "alternative1", "alternative2")) #
2002 May 17
1
What is the most efficient way to assign to PARTS of objects in other frames/environments?
Can please someone familiar with the R internals explain on the following: PR#1434 from r-bugs clarifies that assign("a[1]", x, SomeOtherFrame) or assign("a$a", x, SomeOtherFrame) will NOT assign to an object 'a' in the other frame BUT create a new object called 'a[1]' resp. 'a$a'. This leads to the following question: what is the most
2007 Nov 13
5
How to overload the assignment operator?
Dear all, what is the proper way to make the assignment operator generic and define methods depending on the class of the assigned value? Best regards Jens Oehlschl?gel P.S. I vaguely remember that this was possible in S+. In R I tried to no avail: # using this like h<-1:3 gives Error: in `<-.default`(h, 1:3) : invalid (do_set) left-hand side to assignment
2018 Apr 12
2
How to specify the RegisterClass of an IMPLICIT_DEF?
Hi, I'm implementing the built_vector as an IMPLICIT_DEF followed by INSERT_SUBREGs. This approach is the one of the SPARC architecture. def : Pat<(build_vector (f32 fpimm:$a1), (f32 fpimm:$a2)), (INSERT_SUBREG(INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), (i32 (COPY_TO_REGCLASS (MOVSUTO_A_iSLo (bitcast_fpimm_to_i32 f32:$a1)), FPUaOffsetClass)), A_UNIT_PART),
2007 Oct 27
1
having problems re-ordering a dataframe
Dear R users, I need to reorder a dataframe using 3 variables for the determine the sorting order. When I create a simple dataframe to test the method, things work as I expected: a1 <- rep(1:10, each=8) a2 <- rep(rep(1:2, each=4), 10) a3 <- rep(c(1:4),20) (a <- data.frame(a1, a2, a3)) for each combination of a1 and a2, a3 is increasing t <- order(a$a1, a$a2, rev(a$a3)) b
2008 Sep 15
1
modifying this barplot
Here is an example barplot that needs some tweaking: library(gplots) ratios <- data.frame(c(0.05,0.10,0.9),c(0.06,0.15,0.76)) rownames(ratios) <- c("T1","T2","T3") colnames(ratios) <- c("A1","A2") ratios <- as.matrix(ratios) myplot <- barplot2(ratios, beside = TRUE,col = c("blue",