[R] Select a set of rows based on a condition

2011-12-07 Thread RaoulD
Hi, I need help with selecting a set of rows from a column in a dataset, that matches a string criteria - start and end. The dataset is : variable Name Value List|Index 10 ABC 20 DEF 10 GHI 50 JKL

Re: [R] Select a set of rows based on a condition

2011-12-07 Thread RaoulD
Thanks a million Michael! Works perfectly! Really appreciate it! -- View this message in context: http://r.789695.n4.nabble.com/Select-a-set-of-rows-based-on-a-condition-tp4168594p4171746.html Sent from the R help mailing list archive at Nabble.com.

[R] Coding a new variable based on criteria in a dataset

2010-12-21 Thread RaoulD
Hi, I'm a bit stuck and need some help with R code to code a variable F_R based on a combination of conditions. The first condition would code F_R as F and would be based on the min(Date) and Min(Time) for each combination of UniqueID Reason. The second condition would code the variable as R

Re: [R] Problem with ggplot2 - Boxplot

2010-10-03 Thread RaoulD
Thanks a lot Hadley, this worked. Regards, Raoul -- View this message in context: http://r.789695.n4.nabble.com/Problem-with-ggplot2-Boxplot-tp2549970p2952914.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

[R] Help with panel.text in Lattice - Putting labels for co-oridnates in a plot

2010-10-03 Thread RaoulD
Hi, I am trying to create a Lattice dotplot that has the following data graphed. I need to put labels for each of the co-oridnates on the plot. I have managed to get only one label dispalyed as I don't completely understand the panel.text function. Can someone please help me? # Sub Reason is a

[R] Problem with ggplot2 - Boxplot

2010-09-22 Thread RaoulD
Hi, I am using ggplot2 to create a boxplot that summarizes a continuous variable. This code works fine for me on one PC however when I use it on another it doesnt. The structure of the dataset AHT_TopCD is SubReason=Categorical variable, AHT=Continuous variable. The code for the boxplot:

[R] Data Labels in a barchart (Lattice or otherwise)

2010-07-05 Thread RaoulD
Hi, Can anyone please help me with how I could add labels with the value for each bar in a barchart? (similar to how data labels can be added in Excel) I have done a lot of searching but havent been lucky. Thanks, Raoul -- View this message in context:

Re: [R] Data Labels in a barchart (Lattice or otherwise)

2010-07-05 Thread RaoulD
Thank You David. Yes, I am using the lattice barchart and have managed to add data labels, however, they tend to be on the tip of each bar and are difficult to read as they are partially on the bar. Any help would be greatly appreciated. This is the code I am using:

Re: [R] Calculating Summaries for each level of a Categorical variable

2010-06-27 Thread RaoulD
Hi Corey, Thanks so much for this. However, I get this error for tapply - Error in tapply(RT, RT$R, fun=WA): arguments must have same length. Any idea how to get around this? Thanks again, Raoul -- View this message in context:

Re: [R] Calculating Summaries for each level of a Categorical variable

2010-06-27 Thread RaoulD
Hi Christos, Thanks for this. I had a look at Summary.Forumla in the Hmisc package and it is extremely complicated for me. Still trying to decipher how I could use it. Regards, Raoul -- View this message in context:

[R] Calculating Summaries for each level of a Categorical variable

2010-06-26 Thread RaoulD
Hi, I have a dataset which has a categorical variable R,a count variable C (integer) and 4 or more numeric variables (A,T,W,H - integers) containing measures for R. I would like to summarize each level of the variable R by the average for A,T,W and H. I have written a function to calculate

[R] Weighted Average application on Summary Dataset

2010-06-13 Thread RaoulD
Hi, I have 2 huge datasets - May and Jun - a miniscule sample of one is given below. I am trying to do 2 things with these datasets. I need to verify if the weighted average of variable A for a Reason in Jun is same/different from the same for May. To do this I am first computing the weighted