[R] Extract model from deriv3 or nls

2014-09-18 Thread Riley, Steve
Hello! I am trying to figure out how to extract the model equation when using deriv3 with nls. Here is my example: # # Generate derivatives # Puro.fun2 <- deriv3(expr = ~(Vmax + VmaxT*state) * conc/(K + Kt * state + conc), name = c("Vmax","VmaxT","K","Kt"),

[R] Adding reference line or plane to cloud or wireframe

2011-05-11 Thread Riley, Steve
All, I am wondering how one might add a reference line or plane to a cloud or wireframe plot. I have been unable to figure this out. Let's say I would like to draw a reference for some value of wt in the example below: cl <- 54.1 age <- 10:80 wt <- 25:160 sim <- expand.grid(age = age,

Re: [R] png inside loop

2011-03-07 Thread Riley, Steve
Try: print(xyplot(N_female~eval(parse(text=i)) |group,xlab=i,ylab="Abundance")) Steve Riley, PharmD, PhD Clinical Pharmacology Specialty Care Medicines Development Group Pfizer Inc. 50 Pequot Ave MS-6025-B2110 New London, CT 06320 Email: steve.ri...@pfizer.com Phone: (860) 732-1796 >>-Ori

Re: [R] Using lapply with two lists

2010-03-26 Thread Riley, Steve
Anna, See ?mapply I think you should be able to use that. Steve Riley, Pharm.D., Ph.D. Clinical Pharmacology, Specialty Neuroscience Pfizer Specialty Care Business Unit Mail Stop MS 6025-B2110 50 Pequot Ave New London, CT 06320 steve.ri...@pfizer.com Tel: (860) 732-1796 Fax: (860) 686-567

[R] Conditional sorting

2009-07-24 Thread Riley, Steve
Greetings! I am trying to figure out how to order a data frame by one variable conditioned on another. Here is an example of what I have: d <- data.frame(RUN = rep(1:3, each = 3), ID = 1:9, AUC = runif(9,1,100)) > d RUN ID AUC 1170.2 1286.5 1320.1 24

Re: [R] counting number of "G" in "TCGGGGGACAATCGGTAACCCGTCT"

2008-07-15 Thread Riley, Steve
Daren, Not sure if it is any easier, but another solution is: code <- unlist(strsplit("TCGACAATCGGTAACCCGTCT","")) length(grep("[G]",code)) Steve -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daren Tan Sent: Tuesday, July 15, 2008 11:28 AM T