similar to: combinations of m objects into r groups

Displaying 20 results from an estimated 2000 matches similar to: "combinations of m objects into r groups"

2006 Aug 24
3
generating an expression for a formula automatically
Hi! I would like to be able to create formulas automatically. For example, I want to be able to create a function that takes on two values: resp and x, and then creates the proper formula to regress resp on x. My code: fit.main <- function(resp,x) { form <- expression(paste(resp," ~ ",paste(x,sep="",collapse=" + "),sep="")) z <-
2005 Dec 08
3
Finding all possible partitions of N units into k classes
Dear useRs! I would like to generate a list of all possible (unique) partitions of N units into k classes. For example, all possible partitions of 4 units into 2 classes are (I hope I have not missed anyone): 1,1,1,2 (this can be read as {1,2,3},{4}) 1,1,2,1 1,2,1,1 2,1,1,1 1,1,2,2 1,2,1,2 1,2,2,1 The partitions 1,1,2,2 and 2,2,1,1 are the same and are therefore not two unique
2006 Jun 01
1
how to add point and label to boxplot using bwplot
Hi. My data contains information for 10 hospitals for 12 different measures. Let's call it x1-x12. I need to create a boxplot for each one of this measures and put them into one page. Each plot also needs to be independent, i.e. cannot use the group feature because of different scales for each measure. I was successful using the following code: x1 <- c(1.317604376, 0.978038233,
2006 Mar 03
1
Problem with creating links ("see also" section) in help files.
A link in one of my help files does not work. I have in this help file: \seealso{\code{\link{crit.fun}}, \code{\link{opt.par}}, \code{\link{opt.random.par}}, \code{\link{opt.these.par}}, \code{\link{nkpartitions}}, \code{\link{nkpar}}, \code{\link{plot.check.these.par}} } Everything in one row, the last link does not work. In another help file, I have: \name{plot.mat} \alias{plot.mat}
2006 Mar 13
1
Building help pages
Hello! I was just wondering, why only one of my "Rd" files is converted in "chm" format (REGE) and the other are not when installing a package? The output from installing a package on WinXp is below. I tried to find more information about what "chm" format actually is, however have found none. Best regards and thaks for any replies, Ales Ziberna
2003 Jun 05
2
Samba & Sage Line 50 Accounting
Hi all, Having a very specific problem here: I have a working RedHat9 server running Samba 2.2.7 (the release that comes with RH9), acting as a PDC/File Server to around 15 WinXP Pro client workstations. This all works nicely, apart from our accounting package, Sage Line 50, which depends on its data being stored on a network share. Previously, when the data was stored on a WinNT4 share,
2007 Jun 01
1
object not found inside function
Hi! When running the following code I get the message: Error in eval(expr, envir, enclos) : object "A" not found fm <- function(p,ydata, env = parent.frame()) { #fit model y ~ (b0+b1x1+...+bpxp)*exp(g2plus*z2plus) where bi and g2plus are parameters #create design matrix for linear part fo00 <-
2018 Mar 30
3
getting all circular arrangements without accounting for order
Dear friends, I would like to get all possible arrangements of n objects listed 1:n on a circle. Now this is easy to do in R. Keep the last spot fixed at n and fill in the rest using permuations(n-1, n-1) from the gtools package. However, what if clockwise or counterclockwise arrangements are the same? I know that half of the above (n - 1)! arrangements are redundant. Is there an easy way to
2018 Mar 30
0
getting all circular arrangements without accounting for order
If one is equal to the reverse of another, keep only one of the pair. B. > On Mar 29, 2018, at 9:48 PM, Ranjan Maitra <maitra at email.com> wrote: > > Dear friends, > > I would like to get all possible arrangements of n objects listed 1:n on a circle. > > Now this is easy to do in R. Keep the last spot fixed at n and fill in the rest using permuations(n-1, n-1)
2018 Mar 30
3
getting all circular arrangements without accounting for order
Thanks! Yes, however, this seems a bit wasteful. Just wondering if there are other, more efficient options possible. Best wishes, Ranjan On Thu, 29 Mar 2018 22:20:19 -0400 Boris Steipe <boris.steipe at utoronto.ca> wrote: > If one is equal to the reverse of another, keep only one of the pair. > > B. > > > > > On Mar 29, 2018, at 9:48 PM, Ranjan Maitra
2018 Mar 30
0
getting all circular arrangements without accounting for order
I don't know if this is more efficient than enumerating with distinct directions and weeding... it seems kind of heavyweight to me: ####### library(gtools) directionless_circular_permutations <- function( n ) { v <- seq.int( n-1 ) ix <- combinations( n-1, 2 ) jx <- permutations( n-3, n-3 ) x <- lapply( seq.int( nrow( ix ) ) , function( i ) {
2018 Mar 30
2
getting all circular arrangements without accounting for order
Jeff, I wanted to let you know that your function is faster than generating the directional circular permutations and weeding. Here is the time for n = 10. I compared with just doing the permutations, there is no point in proceeding further with the weeding since it is slower at the start itself. system.time(directionless_circular_permutations(10)) user system elapsed 1.576 0.000
2012 Jul 09
3
Predicted values for zero-inflated Poisson
Hi all- I fit a zero-inflated Poisson model to model bycatch rates using an offset term for effort. I need to apply the fitted model to a datasets of varying levels of effort to predict the associated levels of bycatch. I am seeking assistance as to the correct way to code this. Thanks in advance! Laura [[alternative HTML version deleted]]
2018 Mar 30
0
getting all circular arrangements without accounting for order
New function below is a bit faster due to more efficent memory handling. for-loop FTW! directionless_circular_permutations2 <- function( n ) { n1 <- n - 1L v <- seq.int( n1 ) ix <- combinations( n1, 2L ) jx <- permutations( n-3L, n-3L ) jxrows <- nrow( jx ) jxoffsets <- seq.int( jxrows ) result <- matrix( n, nrow = factorial( n1 )/2L, ncol = n ) k
2007 May 09
4
[LLVMdev] LLVM Developers Meeting - Dinner (Response needed)
LLVM Developer Meeting Attendees, I need to get a count of the people planning to stay after the meeting for dinner. If we have a large enough group, we may need to make special arrangements. Attendees will have to pay for their own dinner, but we can get reservations or possibly reserve a banquet room. So please email me by May 11th, if you plan to go to dinner. Thanks, Tanya Lattner
2013 Jun 19
3
minios, use of namespace
For a while I''ve been intending to provide a better environment for PV baremetal guests. The current arrangements, based on newlib, take quite a bit of porting for many programs. My plan is to take the FreeBSD libc, and write a set of functions implementing the "system calls" in terms of facilities provided by the Xen PV environment, frontend drivers, etc. As part of this I
2006 Oct 13
5
combinatorics
Hi How do I generate all ways of ordering sets of indistinguishable items? suppose I have two A's, two B's and a C. Then I want AABBC AABCB AACBC ABABC . . .snip... BBAAC . . .snip... CBBAA [there are 5!/(2!*2!) = 30 arrangements. Note AABBC != BBAAC] How do I do this? -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14
2009 Apr 16
3
[LLVMdev] Help me improve two-address code
Evan Cheng wrote: > On Apr 16, 2009, at 3:17 PM, Greg McGary wrote: > >> Is there some optimizer knob I'm not turning properly? In more complex >> cases, GCC does poorly with two-address operand choices and so bloats >> the code with unnecessary register moves. I have high hopes LLVM >> can do better, so this result for a simple case is bothersome. >>
2003 May 19
5
Samba - Problem Connecting PCs
Hi, I want to setup Samba as a new PDC. I followed the instructions on IBM's site (http://www-1.ibm.com/servers/esdd/tutorials/samba/index.html) The problem I currently have is that Windows 9X boxes can't connect to the Mandrake 9.1 Bamboo box. However, I can make connections on localhost to localhost using smbclient //localhost/share -U username I've tried a couple of different
2006 Aug 30
1
Installation of SrcStatConnectorSrv on Windows
I am trying to install SrcStatConnectorSrv(2) and rcom from local zip files. I have successfully downloaded both files (from CRAN for rcom CRAN Other for SrcStatConnectorSrv) and installed rcom. However, I get the following error message when I try to install SrcStatConnectorSrv (the version dated 21-Aug-2006: > utils:::menuInstallLocal() Error in gzfile(file, "r") : unable to open