[R] What to do with positive likelihoods

2011-04-19 Thread Turchin, Michael
Hi all, I'll preface this with saying I've gone through the archives, and am still in need of some help. I've been using this likelihood model with mean = 0 and s.d. = sqrt( (c + ( 1 / N1 ) + ( 1 / N2 ) ) * x * ( 1 - x )), where c is a genetic drift parameter (usually very small, like between

Re: [R] Append to outfile in R CMD BATCH mode

2010-03-11 Thread Turchin, Michael
om: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of Turchin, Michael [michael.turc...@childrens.harvard.edu] Sent: Thursday, March 11, 2010 5:27 PM To: r-help@r-project.org Subject: [R] Append to outfile in R CMD BATCH mode Is there a way to append to the outfile when usi

[R] Append to outfile in R CMD BATCH mode

2010-03-11 Thread Turchin, Michael
Is there a way to append to the outfile when using R CMD BATCH? My code, right now, is: R CMD BATCH --slave --vanilla '--args place .2 -.1 .9 .6' StratificationSimulation example.output Everything else is working the way I'd like it. The first few lines of code of my script file are: options(

Re: [R] Searching for option explanations

2010-03-11 Thread Turchin, Michael
Yep, looks like that is what I'm asking about. Didn't realize it! Thank you, exactly what I needed. ~Michael From: Charles C. Berry [cbe...@tajo.ucsd.edu] Sent: Thursday, March 11, 2010 3:37 PM To: Turchin, Michael Cc: r-help@r-project.org Subje

[R] Searching for option explanations

2010-03-11 Thread Turchin, Michael
Hey all, Sorry if this is redundant, but I can't figure out a good search query for either the mailing list, or google, to find an answer to this. Let's say I have a couple of R options I'm interested in learning more about, but their details aren't explained in the command's help file. For exa

Re: [R] Appending results via for loop

2010-02-05 Thread Turchin, Michael
doing this? Thanks, ~Michael From: jim holtman [jholt...@gmail.com] Sent: Friday, February 05, 2010 12:02 PM To: Turchin, Michael Cc: r-help@r-project.org Subject: Re: [R] Appending results via for loop use a list: result <- list() for (i in 1:li

Re: [R] Extract p-value from lm for the whole model

2010-02-05 Thread Turchin, Michael
You should be able to access the p-value using the $coefficients variable, which is part of summary. Try: results <- summary(lm(speed~dist, cars)) results$coefficients and then: results$coefficients[x] where x is the location of particular p-value, or coefficient supplied, you want, from the

[R] Appending results via for loop

2010-02-05 Thread Turchin, Michael
Hey all, So I'm manually conducting a sliding window test, and I would like to tack on results to some variable as the results are outputted. I'm using a for loop, and I am currently using an array as my 'output collector' variable, though I know I should be using a dataframe of some sort. My q