Re: [R] Table rearranging

2012-02-10 Thread Jeffrey Joh
-0500 On Feb 7, 2012, at 8:43 PM, Jeffrey Joh wrote: Hi David, I am not sure how ddply/summarize solves my issue. I have the following table: ID measurement date door color 1 0.93529385 513 open red 2 0.97419293 420 open red 3 0.962053514 513 closed red 4 0.963909937 1230 open

Re: [R] Table rearranging

2012-02-07 Thread Jeffrey Joh
] On Behalf Of Jeffrey Joh Sent: Monday, February 06, 2012 4:28 PM To: r-help@r-project.org Subject: [R] Table rearranging I have a table that looks like this: measurementdatedoorcolor 0.93529385513openred 0.97419293420openred

Re: [R] Table rearranging

2012-02-07 Thread Jeffrey Joh
09:08:00 -0500 On Feb 7, 2012, at 4:21 AM, Jeffrey Joh wrote: Thank you for your help, Bill. From the original table (not the plyr output), I would like to remove all the lines that do not have a corresponding open/closed measurement. For example, if there is a Closed yellow

[R] Table rearranging

2012-02-06 Thread Jeffrey Joh
I have a table that looks like this: measurement    date    door    color 0.93529385    513    open    red 0.97419293    420    open    red 0.962053514    513    closed    red 0.963909937    1230    open    blue 0.97652034    1230    open    green 0.989310795    1230    closed    blue 0.9941022  

[R] Gray levels

2012-01-25 Thread Jeffrey Joh
The gray (level) function returns different shades of gray, where level is a vector of numbers ranging from 0 to 1.  0 is white and 1 is black and everything in between is a shade of gray. Is there a function that will let me choose two different colors?  For example, a 0 might be blue and 1

[R] Display numbers on map

2012-01-17 Thread Jeffrey Joh
I have a text file with states and numbers. I would like to display each number that corresponds to a state on a map. I am trying to use the maps package, but it doesn't show Alaska or Hawaii. Do you have suggestions on how to do this? Jeffrey

[R] Aggregate by minimum

2012-01-09 Thread Jeffrey Joh
For each date, I would like to keep the line with the lowest speed and discard the rest. The result would have one line for each date. Can I use aggregate for this? My table is as follows: structure(list(speed = c(3,9,14,8,7,6), result = c(0.697, 0.011, 0.015, 0.012, 0.018, 0.019), house

[R] Boxplot

2011-11-26 Thread Jeffrey Joh
...@bitwrit.com.au To: johjeff...@hotmail.com CC: r-help@r-project.org Subject: Re: [R] Binned line plot On 11/22/2011 04:29 PM, Jeffrey Joh wrote: I have a scatter plot with 1 points. I would like to add a line that bins every 50 points and connects the average of each bin. I'm looking

[R] Binned line plot

2011-11-21 Thread Jeffrey Joh
I have a scatter plot with 1 points.  I would like to add a line that bins every 50 points and connects the average of each bin.  I'm looking for something similar to line type m in Stata. With this dataset of 1 points, I would also like to bin the data and make boxplots at certain

[R] Graph binned data

2011-11-06 Thread Jeffrey Joh
I have a table that looks like this: structure(list(speed = c(3,9,14,8,7,6), result = c(0.697, 0.011, 0.015, 0.012, 0.018, 0.019), house = c(1, 1, 1, 1, 1, 1), date = c(719, 1027, 1027, 1027, 1030, 1030), id = c(1000, 1, 10001, 10002, 10003, 10004)), .Names = c(speed, result,

Re: [R] Calculating differences

2011-10-22 Thread Jeffrey Joh
, 2011 at 2:56 PM, Jeffrey Joh johjeff...@hotmail.com wrote: I have a table that looks like this: structure(list(speed = c(3,9,4,8,7,6), C = c(0.697, 0.011, 0.015, 0.012, 0.018, 0.019), house = c(1, 1, 1, 1, 1, 1), date = c(719, 1027, 1027, 1027, 1030, 1030), hour = c(18, 8, 8, 8, 11

[R] Calculating differences

2011-10-20 Thread Jeffrey Joh
I have a table that looks like this: structure(list(speed = c(3,9,4,8,7,6), C = c(0.697, 0.011, 0.015, 0.012, 0.018, 0.019), house = c(1, 1, 1, 1, 1, 1), date = c(719, 1027, 1027, 1027, 1030, 1030), hour = c(18, 8, 8, 8, 11, 11), id = c(1000, 1, 10001, 10002, 10003, 10004)),

[R] dput data frame

2011-08-24 Thread Jeffrey Joh
I have a data frame that is about 40 columns by 1 rows. I want to get the dput of small portion of that by using dput(results[1:10,3:6]). The dput is very long and includes all the values from the original data frame. Why is that? Jeffrey

[R] Smooth ecdf

2011-08-15 Thread Jeffrey Joh
Is it possible to smooth an ecdf plot and get a probability density plot? I have about 8000 points and I was hoping to get a density curve instead of a histogram. Jeff __ R-help@r-project.org mailing list

Re: [R] Aggregating data

2011-08-08 Thread Jeffrey Joh
be able to produce graphics for each data subset using the data.table package as well. If you want a more concrete solution, provide a more concrete example. HTH, Dennis On Fri, Aug 5, 2011 at 9:55 AM, Jeffrey Joh johjeff...@hotmail.com wrote: I aggregated my data: aggresults

[R] Aggregating data

2011-08-05 Thread Jeffrey Joh
I aggregated my data: aggresults -aggregate(results, by=list(results$a, results$b, results$c), FUN=mean, na.rm=TRUE) results has about 8000 lines of data, and aggresults has about 80 lines. I would like to create a separate variable for each of the 80 aggregates, each containing the 100

[R] Convert matrix to numeric

2011-08-03 Thread Jeffrey Joh
I have a matrix that looks like this: structure(c(0.0376673981759913, 0.111066500741386, 1, 1103, 18, OPEN, DEPR, 0.0404073656092023, 0.115186044704599, 1, 719, 18, OPEN, DEPR, 0.0665342096693433, 0.197570061769498, 1, 1103, 18, OPEN, DEPR, 0.119287147905722, 0.356427096010845, 1, 1103, 18,

[R] Calculate mean ignore null

2011-08-02 Thread Jeffrey Joh
I have the following: Tout = c(., ., + -51.0, -9.6, -9.6, -9.6, -9.6, -9.6, -9.6, + -9.6, -9.5, -9.5, -9.6, -9.5, -9.6, -9.6, + -9.5, -9.4, -9.3, -9.3, -9.3, -9.2, -9.0, + -9.0, -8.9, -8.9, -8.9) How can I take the mean while ignoring the null values? I

[R] Replacing null values

2011-07-30 Thread Jeffrey Joh
I would like to reorder a two-column table by column A, then fill column B with the values above it. For example: Original:A B2 545 NA8 784 NULL3 269 NULL First sort by column A:A B2 543 264 NULL5 NA8 789 NULL Then replace null/na values in column

Re: [R] Replacing null values

2011-07-30 Thread Jeffrey Joh
30, 2011, at 2:25 AM, Jeffrey Joh wrote: I would like to reorder a two-column table by column A, then fill column B with the values above it. For example: Original:A B2 545 NA8 784 NULL3 269 NULL First sort by column A:A B2 543 264 NULL5 NA8 789