similar to: [newbie] aggregating table() results and simplifying code with loop

Displaying 20 results from an estimated 100 matches similar to: "[newbie] aggregating table() results and simplifying code with loop"

2009 Nov 20
2
Problem with Numerical derivatives (numDeriv) and mvtnorm
I'm trying to obtain numerical derivative of a probability computed with mvtnorm with respect to its parameters using grad() and jacobian() from NumDeriv. To simplify the matter, here is an example: PP1 <- function(p){ thetac <- p thetae <- 0.323340333 thetab <- -0.280970036 thetao <- 0.770768082 ssigma <- diag(4) ssigma[1,2] <- 0.229502120
2019 Dec 09
2
[PATCH] D70246: [InstCombine] remove identity shuffle simplification for mask with undefs
Sanjay, I'm looking at some missed optimizations caused by D70246. Here's a test case: define <4 x float> @f(i32 %t32, <4 x float>* %t24) { .entry: %t43 = insertelement <3 x i32> undef, i32 %t32, i32 2 %t44 = bitcast <3 x i32> %t43 to <3 x float> %t45 = shufflevector <3 x float> %t44, <3 x float> undef, <4 x i32> <i32 0, i32 undef,
2006 Apr 11
1
problems with assign
Hello. I have n files in a directory: file1, ..., filen. I read them with the following commands: list=scan(file="list",what=list(nom="")) # in the file list, I have all the filenames. n=length(list[[1]]) for (i in 1:n){ aux <- paste("p",i,sep="") assign(aux, as.matrix(read.table(list[[1]][i]))) } R creates the matrices p1,p2,...,pn. I want
2008 Mar 07
1
Finding Interaction and main effects contrasts for two-way ANOVA
I've tried without success to calculate interaction and main effects contrasts using R. I've found the functions C(), contrasts(), se.contrasts() and fit.contrasts() in package gmodels. Given the url for a small dataset and the two-way anova model below, I'd like to reproduce the results from appended SAS code. Thanks. --Dale. ## the dataset (from Montgomery) twoway <-
2017 Feb 28
2
rL296252 Made large integer operation codegen significantly worse.
I see we're missing an isel pattern for add producing carry and doing a memory RMW. I'm going to see if adding that helps anything. ~Craig On Mon, Feb 27, 2017 at 8:47 PM, Nirav Davé via llvm-dev < llvm-dev at lists.llvm.org> wrote: > Yes. I'm seeing that as well. Not clear what's going on. > > In any case it looks to be unrelated to the alias analysis so barring
2013 Oct 03
1
version comparison puzzle
Can anyone explain what I'm missing here? max(pp1 <- package_version(c("0.99999911.3","1.0.4","1.0.5"))) ## [1] ?1.0.4? max(pp2 <- package_version(c("1.0.3","1.0.4","1.0.5"))) ## [1] ?1.0.5? I've looked at ?package_version , to no avail. Since max() goes to .Primitive("max") I'm having trouble figuring out
2005 Sep 30
2
Creating an array [0 to 101] of a list
Hi I looked, but I didn't find it: I need an array [0 to 101] where each element is a list (the result of Kest in spatstat). I.e. I want to do: A[2] <- Kest(pp1) A[3] <- Kest(pp2) ... A[101] <- Kest(pp100) How can I create A ? Rainer -- Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation Biology (UCT) Department of Conservation Ecology University of Stellenbosch Matieland
2008 Jan 15
2
Looking for simpler solution to probabilistic question
Hi I have two processes which take with a certain probability (p1 and p2) x number of years to complete (age1 and age2). As soon as thge first process is completed, the second one begins. I want to calculate the time it takes for the both processes to be completed. I have the following script which gives me the answer, butI think there must be a more elegant way of doing the calculations
2016 Aug 02
2
Instruction selection problems due to SelectionDAGBuilder
Hello. I'm having problems at instruction selection with my back end with the following basic-block due to a vector add with immediate constant vector (obtained by vectorizing a simple C program doing vector sum map): vector.ph: ; preds = %vector.memcheck50 %.splatinsert = insertelement <8 x i64> undef, i64 %i.07.unr, i32 0
2007 Apr 17
6
[Bug 554] Packet illegaly bypassing SNAT
https://bugzilla.netfilter.org/bugzilla/show_bug.cgi?id=554 ------- Additional Comments From fhagur@gmail.com 2007-04-17 05:04 MET ------- I have been wondering about this bug and had similar problems myself here in my Debian system, linux-kernel 2.6.18 iptables 1.3.6. I too saw that some packets became transmitted illegally through the ppp0 interface, when they just shoudn't. What I
2004 Jan 13
1
simple(?!?) source routing
Hi, I''ve set up a Linux box with redhat on to act as an internet gateway and I''m running into a few problems. Its got two adsl modems connected to it, both connected to seperate 512kbs lines. Now I''ve followed the simple source routing in the advanced routing howto to the letter but it doesnt work. I''ve got it autoconnecting on startup and redhat puts ppp1
2004 Jan 15
2
Fw: Re:simple(?!?) source routing
Hi, Thanks for the reply. Thats where the problem starts. If I set ppp0 as the default gw the internet doesnt work anymore. This is how im doing it... route del default route add default gw 217.32.81.74 dev ppp0 if I put it back to ppp1... route del default route add default gw 217.32.68.73 dev ppp1 It works fine again. Whats up with that? Cheers, Chris ----- Original Message
2006 May 31
7
Getting at MakeOpenFile
Along the same lines as the last question - how can I get to functions like MakeOpenFile via Win32API? It doesn''t seem to be exported by msvcrt-ruby18. Possible? Or am I out of luck? Dan This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have
2002 Aug 30
4
(PR#1964) The attached function working fine with R 1.3.0 but giving problem with R 1.5.1 (PR#1964)
The division part of the following code is not executing - (seq(n-1)*mean(XS)-cumsum(XS[seq(n-1)]))*diff(XS)/((n-1)*var(XS)) Note: Prof Yatracos: Would you please send them one example ? Thanks, Kaushik -----Original Message----- From: ripley@stats.ox.ac.uk [mailto:ripley@stats.ox.ac.uk] Sent: Friday, August 30, 2002 4:27 PM To: Kaushik Bhattacharyya Cc: r-devel@stat.math.ethz.ch;
2013 Aug 10
0
[LLVMdev] Address space extension
(The previous sent message had some issues...) ---------------------------------------------- Hello to everybody, I just want make a quick summary: OBJECTIVE: discuss for finding a way to represent logical (derived from source language abstractions) address space also in the IR to be able to exploit this information for optimizations. CURRENT STATE: The partial workaround probably used IMO
2004 Oct 13
4
incomplete function output
Dear R users, I have a function (below) which encompasses several tests. However, when I run it, only the output of the last test is displayed. How can I ensure that the function root(var) will run and display the output from all tests, and not just the last one? Thank you, b. root <- function(var) { #---Phillips-Perron PP.test(var, lshort = TRUE) PP.test(var, lshort = FALSE)
2012 Sep 14
0
problem with user defined panel function in xyplot
Hi everyone, ? I am trying to do a horizonplot using my own time series data. I know that there is a horizonplot function in latticeExtra, but on closer examination i think that the graph itself is slightly wrong (it displays some regions as triangles and i think they should be trapezoids, and the red regions (that are below the baseline) are displayed on top of the blue areas ? while i think
2012 Oct 04
1
APC Smart-UPS 1200
Hi. Is the subject UPS model supported? I believe so, but I don't have a unit to test with. Any comments on this model? I'm trying to advise a colleague. Thank you, as always. T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=051d ProdID=0003 Rev= 1.06 S: Manufacturer=American Power
2006 Apr 20
1
Powerware 3105 - SuSE 10.0
Hi, I'm trying to get a Powerware 3105 UPS working on SuSE 10.0. I have compiled nut from the current Subversion repository. This UPS uses the bcmxcp_usb driver. I cannot get the driver to find the ups on the USB bus. The error message I get is:- -------------- bcmxcp_usb -u nut -DDDDD -a pw3105 -------------------- Network UPS Tools - BCMXCP UPS driver 0.10 (2.1.0) debug level is
2013 Aug 07
7
[LLVMdev] Address space extension
Hello to everybody, I would like to start a discussion about a possible extension of address space concept in LLVM. The idea was born starting from this discussion in the clang mailing list (first msg: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130715/084011.html - interesting point: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130722/084499.html) where