Re: [R] Iteration idioms laziness

2009-11-29 Thread David Duffy
array, so they might do what you want. The OP may also be interested in the jit package, which currently just covers (see http://www.milbo.users.sonic.net/ra) loops, but might eventually extend to TCO. David Duffy. -- | David Duffy (MBBS PhD

Re: [R] help needed for HWE.exact in library genetics

2008-08-22 Thread David Duffy
... David Duffy. -- | David Duffy (MBBS PhD) ,-_|\ | email: [EMAIL PROTECTED] ph: INT+61+7+3362-0217 fax: -0101 / * | Epidemiology Unit, Queensland Institute of Medical Research \_,-._/ | 300 Herston Rd, Brisbane, Queensland 4029, Australia GPG

Re: [R] How to solve empty cells in the contingency table?

2008-06-27 Thread David Duffy
with zero marginals.Does someone have some suggestions? Please help me out, thanks a lot! Cheers, Yan One approach: if they are *structural zeroes*, tab - as.data.frame(table(x,y)) then use the exactLoglinTest package's mcexact function David Duffy

Re: [R] EM algorithm for multiple-locus haplotypes frequencies

2008-04-18 Thread David Duffy
the libraries whose name starts haplo eg haplo.stats. -- | David Duffy (MBBS PhD) ,-_|\ | email: [EMAIL PROTECTED] ph: INT+61+7+3362-0217 fax: -0101 / * | Epidemiology Unit, Queensland Institute of Medical Research \_,-._/ | 300 Herston Rd, Brisbane

Re: [R] Packages for Animal Models QG analyses

2007-11-27 Thread David Duffy
amenable to an ANOVA/hierarchical setup then lme4 as well (which does GLMMs nicely). Have you tried Wombat (non-R)? David Duffy. -- | David Duffy (MBBS PhD) ,-_|\ | email: [EMAIL PROTECTED] ph: INT+61+7+3362-0217 fax: -0101 / * | Epidemiology Unit

Re: [R] popular R packages

2009-03-09 Thread David Duffy
classes gives us 108 journal citations; mgcv: GAMs and generalized ridge regression for R 80 etc Cheers, David Duffy. -- | David Duffy (MBBS PhD) ,-_|\ | email: dav...@qimr.edu.au ph: INT+61+7+3362-0217 fax: -0101 / * | Epidemiology Unit, Queensland

Re: [R] R-help Digest, Vol 71, Issue 16

2009-01-17 Thread David Duffy
(locus_coordinate)[chrom==1]), axes=F, xlab= , ylab= )) paint.chromosome(1, pos=2.2) points(cbind(locus_coordinate[chrom==1], rep(2, length(locus_coordinate)[chrom==1]), col=red, cex=4) Unfortunately for you, the units here are cM ;). David Duffy. -- | David Duffy (MBBS PhD

Re: [R] simulate correlated binary, categorical and continuous variable

2012-03-31 Thread David Duffy
(0,0),matrix(c(1,r,r,1), nr=2)) x[xthresh] - 2 x[x2] - 1 polychor(x[,1], x[,2]) } tr - double(100) for(i in 1:100) tr[i] - sim1() summary(tr) Min. 1st Qu. MedianMean 3rd Qu.Max. 0.1571 0.2703 0.3041 0.3010 0.3328 0.4062 -- | David Duffy (MBBS PhD

Re: [R] iPhone 3G App For R?

2011-01-03 Thread David Duffy
toolchain, though I can't see if gfortran is available. Cheers, David Duffy. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

Re: [R] Converting Fortran or C++ etc to R

2011-01-05 Thread David Duffy
have a lot of code to port, and are hinting you would like an automated tool, I think you are out of luck ;) There is a Fortran to Lisp translator (f2cl), but I think the resulting code will not get you a lot closer (it is aimed at compilation). Cheers, David Duffy. -- | David Duffy (MBBS PhD

Re: [R] Vermunt's LEM in R

2011-05-11 Thread David Duffy
(dim\n) for(i in seq(1, ncol(newtab)-1) { cat(nlevels(newtab[,1], ) } cat(\nlab ) for(i in seq(1, ncol(newtab)-1) { cat(letters[i], ) } cat(\ndat [, newtab[,Freq], ]\n) -- | David Duffy (MBBS PhD) ,-_|\ | email: dav...@qimr.edu.au ph: INT+61+7+3362

Re: [R] Getting SNPS from PLINK to R

2011-06-21 Thread David Duffy
snpMatrix package is quite nice (read.plink()) __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal,

Re: [R] Hardy Weinberg

2011-06-22 Thread David Duffy
I am interested in simulating 10,000 2 x 3 tables for SNPs data with the Hardy Weinberg formulation. Is there a quick way to do this? I am assuming that the minor allelle frequency is uniform in (0.05, 0.25). rmultinom() with HWE expectations __

Re: [R] Hardy Weinberg Simulation

2011-06-29 Thread David Duffy
, 0.34))) size should be the total size ie 100. -- | David Duffy (MBBS PhD) ,-_|\ | email: dav...@qimr.edu.au ph: INT+61+7+3362-0217 fax: -0101 / * | Epidemiology Unit, Queensland Institute of Medical Research \_,-._/ | 300 Herston Rd, Brisbane

Re: [R] R-help Digest, Vol 124, Issue 22

2013-06-21 Thread David Duffy
Vallejo, Roger roger.vall...@ars.usda.gov asked: I would like to know if we can estimate Rg between two binary traits (disease status: alive vs. dead) with the R package. My data: we have 100 full-sib (FS) families, and two random samples (each with n= 200 FS fish) from each FS family were

Re: [R] snpStats reference allele used in genetic associations?

2014-05-25 Thread David Duffy
francesca casalino francy.casal...@gmail.com asked: Does anyone know how to find the reference allele used for genetic associations ran in snpStats? A is ref allele, B is risk allele. __ R-help@r-project.org mailing list

Re: [R] Fortran and long integers

2011-02-07 Thread David Duffy
) 9223372036854775807 -- | David Duffy (MBBS PhD) ,-_|\ | email: dav...@qimr.edu.au ph: INT+61+7+3362-0217 fax: -0101 / * | Epidemiology Unit, Queensland Institute of Medical Research \_,-._/ | 300 Herston Rd, Brisbane, Queensland 4029, Australia GPG 4D0B994A

Re: [R] using the bootstrap method for latent class analysis

2011-02-17 Thread David Duffy
a small self-contained example. Cheers, David Duffy. -- | David Duffy (MBBS PhD) ,-_|\ | email: dav...@qimr.edu.au ph: INT+61+7+3362-0217 fax: -0101 / * | Epidemiology Unit, Queensland Institute of Medical Research \_,-._/ | 300 Herston Rd, Brisbane

[R] Differences between MTDFReml and kinship2

2014-11-06 Thread David Duffy
list. Cheers, David Duffy. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] R-help Digest, Vol 206, Issue 25

2020-04-29 Thread David Duffy
lavaan has the lavCor() function to estimate tetrachoric correlations and fit structural equation models. So you can probably fit your factor model directly and get correct statistical tests there. Cheers, David Duffy. __ R-help@r-project.org mail