Re: [R] locate substring in the string it belong to

2009-07-20 Thread Scott Sherrill-Mix
ch we just found string<-sub(search,mask,string) } print(found) Scott Scott Sherrill-Mix Department of Microbiology University of Pennsylvania 402B Johnson Pavilion 3610 Hamilton Walk Philadelphia, PA 19104-6076 Phone: 215-573-3141 On Mon, Jul 20, 2009 at 4:43 AM, kevinchang wrote: > >

Re: [R] Continue to finish for loop even there is an error in one of rounds.

2009-07-30 Thread Scott Sherrill-Mix
You probably want to wrap the nls(...) in a 'try' or 'tryCatch' function. Scott Scott Sherrill-Mix Department of Microbiology University of Pennsylvania 402B Johnson Pavilion 3610 Hamilton Walk Philadelphia, PA 19104-6076 Phone: 215-573-3141 On Thu, Jul 30, 2009 at 1:14

Re: [R] overlap two graph

2009-08-05 Thread Scott Sherrill-Mix
Did you try already try: plot(ellipsePoints(2,5, alpha = 30), asp=1) points(ellipsePoints(2,5, alpha = 60), asp=1,col='red') ? Scott Scott Sherrill-Mix Department of Microbiology University of Pennsylvania 402B Johnson Pavilion 3610 Hamilton Walk Philadelphia, PA 19104-6076 On

Re: [R] Starting NONMEM (nmfe6) from R

2009-08-05 Thread Scott Sherrill-Mix
ot;K:\nmvi\path\output.txt" Alternatively, you could make sure R is working in the right directory. e.g. setwd('K:\nmvi') Scott Scott Sherrill-Mix Department of Microbiology University of Pennsylvania 402B Johnson Pavilion 3610 Hamilton Walk Philadelphia, PA 19104-6076 Phone: 215-5

Re: [R] overlap two graph

2009-08-06 Thread Scott Sherrill-Mix
us ellipse). If you're looking for an alternative way to do it, you could rbind the outputs together and then plot the whole thing: allPoints<-rbind(ellipsePoints(2,5, alpha = 30),ellipsePoints(2,5, alpha = 60)) plot(allPoints) Scott Scott Sherrill-Mix Department of Microbiology Universi

Re: [R] random between two values

2009-08-06 Thread Scott Sherrill-Mix
Or just use runif's built-in bounds: thisMin<-40.15 thisMax<-56.58 runif(1,thisMin,thisMax) Scott Scott Sherrill-Mix Department of Microbiology University of Pennsylvania 402B Johnson Pavilion 3610 Hamilton Walk Philadelphia, PA 19104-6076 On Thu, Aug 6, 2009 at 11:11 AM, S

Re: [R] Generating R plots via Ruby CGI

2009-08-11 Thread Scott Sherrill-Mix
SE) plot(swiss$Catholic, swiss$Examination) dev.off() You'll probably want to switch postscript() to png() for web stuff but sometimes that can have funny X11/display requirements so probably better to try the postscript first then go from there. Scott Scott Sherrill-Mix Department of Micr

Re: [R] Paste symbol and calculation in plot

2009-08-11 Thread Scott Sherrill-Mix
I'm no expert at this but it seems like ?plotmath is saying to do something like: text(2,0.35,bquote(sigma==.(mySigma),list('mySigma'=round(sd(Data),digits=3)))) Scott Scott Sherrill-Mix Department of Microbiology University of Pennsylvania 402B Johnson Pavilion 361

Re: [R] Prevent sequential repeated values in data frame column

2009-08-11 Thread Scott Sherrill-Mix
l))){ message('Scrambling for the ',run,' time') newX<-x[sample(1:nrow(x),nrow(x)),] run<-run+1 } print(newX) Scott Scott Sherrill-Mix Department of Microbiology University of Pennsylvania 402B Johnson Pavilion 3610 Hamilton Walk Philadelphia, PA 19104-6076 On Tue

Re: [R] inserting into data frame gives "invalid factor level, NAs generated"

2009-08-12 Thread Scott Sherrill-Mix
value and complains. You'd probably be pretty safe using character columns instead of factors for now (by adding stringsAsFactors=FALSE to data.frame()) e.g.: goframe<-data.frame(goA = character(10), goB = character(10), value =numeric(10),stringsAsFactors=FALSE) Scott Scott Sherrill

Re: [R] Using bold font with bquote

2009-08-12 Thread Scott Sherrill-Mix
;mySigma'=format(round(sd(Data),digits=3),big.mark=","))), col='blue') Scott Scott Sherrill-Mix Department of Microbiology University of Pennsylvania 402B Johnson Pavilion 3610 Hamilton Walk Philadelphia, PA 19104-6076 On Wed, Aug 12, 2009 at 12:36 PM, Jonathan R. Blaufuss

Re: [R] Another Plotting Hint - changing fill color for points

2009-08-12 Thread Scott Sherrill-Mix
I don't really use Word or .wmf but maybe try a high pixel count .png e.g. png('test.png',height=480*5,width=480*5,res=72*5) plot(1:10, col = "red", bg = "grey", pch=21, cex =1.7) dev.off() Scott Scott Sherrill-Mix Department of Microbiology University of Penn

Re: [R] problem in loop

2009-09-02 Thread Scott Sherrill-Mix
orr_gee, se_corrgee) ... Scott Scott Sherrill-Mix Department of Microbiology University of Pennsylvania 425 Johnson Pavilion 3610 Hamilton Walk Philadelphia, PA 19104-6076 Phone: (215) 573-3141 On Wed, Sep 2, 2009 at 4:45 PM, milton ruser wrote: > Hi there, > > and how about this: > >

Re: [R] Help with output height

2009-09-22 Thread Scott Sherrill-Mix
nu of the GUI too if you'd prefer that. Scott Scott Sherrill-Mix Genomics and Computational Biology University of Pennsylvania On Tue, Sep 22, 2009 at 3:52 PM, Paula Fergnani Salvia wrote: > Hello everyone > I have a problem using the R console. I have written 2000 lines in a notepad,