similar to: N:M:K Relationships

Displaying 20 results from an estimated 5000 matches similar to: "N:M:K Relationships"

2005 Dec 17
4
Rake migrate and creating join tables
Just wondering if there''s a way to use migrations to generate join tables (where the table columns comprise only of foreign keys to other tables, and where the primary key is all the foreign keys taken together). I made the changes manually in MySQL, then did rake db_schema_dump and it gave something like this: create_table "apples_oranges", :id => false, :force
2011 Jan 18
2
Dovecor 1.2 : Command output: Fatal: Unknown argument: flags=DRhu Usage: deliver [-c <config file>] [-a <address>] [-d <username>] [-p <path>] [-f <envelope sender>] [-m <mailbox>] [-n] [-s] [-e] [-k] )
Hi there, I changed postfix to pass email to spamassassin, and then deliver to dovecot LDA. It fails to deliver. The current entry in master.cf now reads: dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d ${recipient} smtp inet n - - - - smtpd -o content_filter=spamassassin
2006 Aug 27
3
n-to-m relationships in Forms
Hi, I can''t understand the RoR-API concerning certain form helpers. Can you maybe help me? I have a model, Film, with a habtm-relationship to the model Language. Now if I want to have a form for editing/creating a Film, I''d like to have checkboxes for each Language with those checked that are associated with the Film in question. Is there an "easy" way to do this
2020 Jan 14
0
[R] choose(n, k) as n approaches k
On 14/01/2020 10:07 a.m., peter dalgaard wrote: > Yep, that looks wrong (probably want to continue discussion over on R-devel) > > I think the culprit is here (in src/nmath/choose.c) > > if (k < k_small_max) { > int j; > if(n-k < k && n >= 0 && R_IS_INT(n)) k = n-k; /* <- Symmetry */ > if (k < 0) return 0.;
2000 Dec 13
0
choose(n, k) for k>n: An inconsistency?
It took me by surprise to find that choose(4,5) delivers [1] NaN Warning message: NaNs produced in: choose(n, k) If we look at choose(4,5) as the number of ways of choosing 5 objects from 4 I would have expected 0 as result. Furthermore dhyper(5,4,6,5) does deliver 0 and this essentially equivalent to choose(4,5)*choose(6,0)/choose(10,5).
2020 Jan 14
0
[R] choose(n, k) as n approaches k
On 14/01/2020 10:50 a.m., peter dalgaard wrote: > > >> On 14 Jan 2020, at 16:21 , Duncan Murdoch <murdoch.duncan at gmail.com> wrote: >> >> On 14/01/2020 10:07 a.m., peter dalgaard wrote: >>> Yep, that looks wrong (probably want to continue discussion over on R-devel) >>> I think the culprit is here (in src/nmath/choose.c) >>> if (k
2020 Jan 14
1
[R] choose(n, k) as n approaches k
Yep, that looks wrong (probably want to continue discussion over on R-devel) I think the culprit is here (in src/nmath/choose.c) if (k < k_small_max) { int j; if(n-k < k && n >= 0 && R_IS_INT(n)) k = n-k; /* <- Symmetry */ if (k < 0) return 0.; if (k == 0) return 1.; /* else: k >= 1 */ if n is a near-integer, then k
2020 Jan 14
0
[R] choose(n, k) as n approaches k
At the risk of throwing oil on a fire. If we are talking about fractional values of choose() doesn't it make sense to look to the gamma function for the correct analytic continuation? In particular k<0 may not imply the function should evaluate to zero until we get k<=-1. Example: ``` r choose(5, 4) #> [1] 5 gchoose <- function(n, k) { gamma(n+1)/(gamma(n+1-k) * gamma(k+1))
2020 Jan 13
3
choose(n, k) as n approaches k
This struck me as incorrect: > choose(3.999999, 4) [1] 0.9999979 > choose(3.9999999, 4) [1] 0 > choose(4, 4) [1] 1 > choose(4.0000001, 4) [1] 4 > choose(4.000001, 4) [1] 1.000002 Should base::choose(n, k) check whether n is within machine precision of k and return 1? Thanks, Erik *** sessionInfo() R version 3.6.0 beta (2019-04-15 r76395) Platform: x86_64-apple-darwin15.6.0
2020 Jan 13
3
choose(n, k) as n approaches k
This struck me as incorrect: > choose(3.999999, 4) [1] 0.9999979 > choose(3.9999999, 4) [1] 0 > choose(4, 4) [1] 1 > choose(4.0000001, 4) [1] 4 > choose(4.000001, 4) [1] 1.000002 Should base::choose(n, k) check whether n is within machine precision of k and return 1? Thanks, Erik *** sessionInfo() R version 3.6.0 beta (2019-04-15 r76395) Platform: x86_64-apple-darwin15.6.0
2003 Aug 01
1
index all subsets of k of m items?
How can I efficiently index all choose(m, k) subsets of m items taken k at a time? For example, with (m, k) = (3, 2), the subsets are (1, 2), (1, 3), and (2, 3). I'd like a function something like "index.subsets(subset, k, m)" that would return 1, 2 or 3 for these 3 subsets. Examples: index.subsets(c(1,2), 2, 3) -> 1 index.subsets(c(1,3), 2, 3) -> 2
2009 Dec 08
1
Printing 'k' levels of factors 'n' times each, but 'n' is unequal for all levels ?
Dear List, I need to print out each of 'k' levels of a factor 'n' times each, where 'n' is the number of elements belonging to each factor. I know that this can normally be done using the gl() command, but in my case, each level 'k' has an unequal number of elements. Example with code is as below: vc<-read.table("P:\\Transit\\CORRECT
2020 Jan 14
2
[R] choose(n, k) as n approaches k
> On 14 Jan 2020, at 16:21 , Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > > On 14/01/2020 10:07 a.m., peter dalgaard wrote: >> Yep, that looks wrong (probably want to continue discussion over on R-devel) >> I think the culprit is here (in src/nmath/choose.c) >> if (k < k_small_max) { >> int j; >> if(n-k < k
2020 Jan 15
1
[R] choose(n, k) as n approaches k
That crossed my mind too, but presumably someone designed choose() to handle the near-integer cases specially. Otherwise, we already have beta() -- you just need to remember what the connection is ;-). I would expect that it has to do with the binomial and negative binomial distributions, but I can't offhand picture a calculation that leads to integer k, n plus/minus a tiny numerical error
2005 Dec 08
0
Finding all possible partitions of N units into k classe
See Also http://finzi.psych.upenn.edu/R/library/caTools/html/combs.html Jarek Tuszynski -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] Sent: Thursday, December 08, 2005 11:19 AM To: Ales Ziberna Cc: R-help Subject: Re: [R] Finding all possible partitions of N units into k classe On 08-Dec-05 Ales Ziberna wrote: > Dear
2006 May 09
1
combn(n, k, ...) and all its re-inventions
It seems people are reinventing the wheel here: The goal is to generate all combinations of 1:n of size k. This (typically) results in a matrix of size k * choose(n,k) i.e. needs O(n ^ k) space, hence is only applicable to relatively small k. Then alternatives have been devised to generate the combinations "one by one", and I think I remember there has been a quiz/challenge about 20
2004 Sep 13
0
Re: n-^o m, or_e pain cause you have some chioces you do n`'ot have before
her. We must go shopping tomorrow aftern,~oon, Meg. There is so much to do about the play for Christmas night," said Jo, marching up and down, with her hands -----Original Message----- From: May Little [mailto:vpj at fqgwkh.com] To: leonardo vastakis; antonio braucht; jed marola; franklin christenson; juan zavala Sent: Thursday, September, 2004 4:47 AM Subject: n.,o m~or'e pain cause
2003 Mar 26
2
Plotting K-M Curve when have several strata
Hi, If I have: foo <- survfit(y ~ x) where y is a survival object and x is a n-level factor. The documentation says when I plot(foo), the confidence intervals will not be plotted (which I guess is understandable as otherwise the plot will get really messy). I tried to plot with confidence intervals by using: plot(foo, conf.int = TRUE) and indeed the resulting plot is messy. However
2006 Mar 07
7
m:n or multiple 1:n?
I have a Newbee question: i have three tables and want to connect them. so is it stupid to make a triple m:n (rails style xs_ys_zs) or do i have to make a new table (newtable) where i got multiple 1:n? the habtm (has and belongs to many) do only work proper to join two tables, or i am wrong? -jens -- Posted via http://www.ruby-forum.com/.
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