Re: [R] if/else help

2016-09-22 Thread Crombie, Burnette N
Thanks very much for your detailed reply to my post. Very helpful/useful tool(s) you’ve provide me. Best wishes, B. From: William Dunlap [mailto:wdun...@tibco.com] Sent: Wednesday, September 21, 2016 10:48 AM To: Crombie, Burnette N Cc: r-help@r-project.org Subject: Re: [R] if/else help If

Re: [R] if/else help

2016-09-22 Thread Crombie, Burnette N
ishes - B -Original Message- From: MacQueen, Don [mailto:macque...@llnl.gov] Sent: Wednesday, September 21, 2016 11:26 AM To: Crombie, Burnette N ; r-help@r-project.org Subject: Re: [R] if/else help Hopefully this is not a homework question. The other responses are fine, but I would sugges

[R] if/else help

2016-09-20 Thread Crombie, Burnette N
If a data.frame (r4) does not exist in my R environment, I would like to create it before I move on to the next step in my script. How do I make that happen? Here is what I want to do from a code perspective: if (exists(r4)) { is.data.frame(get(r4)) } else { a <- 0, b <- 0, c <- 0, d <- "x", r4

Re: [R] How to round only one df row & how to keep 3rd sigdif if zero

2015-06-18 Thread Crombie, Burnette N
eers. -Original Message- From: PIKAL Petr [mailto:petr.pi...@precheza.cz] Sent: Thursday, June 18, 2015 10:56 AM To: Crombie, Burnette N; r-help@r-project.org Subject: RE: [R] How to round only one df row & how to keep 3rd sigdif if zero Hi You need to distinguish between an object and printing a

Re: [R] Make 2nd col of 2-col df into header row of same df then adjust col1 data display

2014-12-19 Thread Crombie, Burnette N
ve time. I'll update everyone then. -- BNC -Original Message- From: John Kane [mailto:jrkrid...@inbox.com] Sent: Friday, December 19, 2014 8:44 AM To: Sven E. Templer; Chel Hee Lee Cc: R Help List; Crombie, Burnette N Subject: Re: [R] Make 2nd col of 2-col df into header row of same

Re: [R] Make 2nd col of 2-col df into header row of same df then adjust col1 data display

2014-12-18 Thread Crombie, Burnette N
ssage- From: Boris Steipe [mailto:boris.ste...@utoronto.ca] Sent: Thursday, December 18, 2014 5:29 AM To: Crombie, Burnette N Cc: r-help@r-project.org Subject: Re: [R] Make 2nd col of 2-col df into header row of same df then adjust col1 data display What you are describing sounds like a very spre

Re: [R] count and sum simultaneously in R pivot table

2014-02-18 Thread Crombie, Burnette N
The script works nicely, Arun. You were right, I pasted code from email instead of Rhelp and didn't reformat properly in R. I appreciate your time with this! -Original Message- It seems like part of the next line is also being run (in the end 'colnames'). For e.g. res2 <- within(as.dat

Re: [R] count and sum simultaneously in R pivot table

2014-02-18 Thread Crombie, Burnette N
ied a couple of modifications, but obviously don't know what I'm doing because I haven't fixed it. If anything comes to you in the meantime, please advise. Thanks. -Original Message- From: arun [mailto:smartpink...@yahoo.com] Sent: Tuesday, February 18, 2014 2:28 AM To:

Re: [R] condense repetitive code for read.csv and rename.vars

2013-08-15 Thread Crombie, Burnette N
Thanks very much for your contribution, Siraaj. I appreciate you taking the time to help me learn loops, etc. BNC -Original Message- From: Siraaj Khandkar [mailto:sir...@khandkar.net] Sent: Wednesday, August 14, 2013 9:08 PM To: Crombie, Burnette N Cc: r-help@r-project.org Subject: Re

Re: [R] create new matrix from user-defined function

2013-07-11 Thread Crombie, Burnette N
Oh, also thanks for the speed comparisons. Missed that in my first read-through. Very interesting and informative. BNC -Original Message- From: Crombie, Burnette N Sent: Thursday, July 11, 2013 4:40 PM To: 'arun' Cc: R help Subject: RE: [R] create new matrix from us

Re: [R] help with text patterns in strings

2013-06-20 Thread Crombie, Burnette N
Thanks, Arun. I will study this as soon as possible. I really appreciate your time and R mentoring. Try this: res1<-sapply(vec3,function(x) length(vec2New[grep(x,vec2New)]) ) dat1<-data.frame(res1,Name=names(vec3)) dat1$Name<-factor(dat1$Name,levels=c(