Hello I have a large series of data value -- effectivly say the point across the x-axis where a pitch crosses home plate. What I want to do is find the % of ground balls at various distances across home plate. I therefore need to 'bin' the two data sets I have - plate location for ground balls and plate location for all other outcomes. Question is how can I set up a series of bins between x and y with bin width (y-x)/200, as an example ... Thanks John -- View this message in context: http://r.789695.n4.nabble.com/Binning-data-tp3351308p3351308.html Sent from the R help mailing list archive at Nabble.com.
On Mar 12, 2011, at 11:35 PM, johnbeamer wrote:> Hello > > I have a large series of data value -- effectivly say the point > across the > x-axis where a pitch crosses home plate. What I want to do is find > the % of > ground balls at various distances across home plate. > > I therefore need to 'bin' the two data sets I have - plate location > for > ground balls and plate location for all other outcomes. > > Question is how can I set up a series of bins between x and y with > bin width > (y-x)/200, as an example ...Most probably a combination of: ?seq ?cut You might also want to look at findInterval but that would not seem to be necessary in this instance. It's really an excellent function for doing indexed lookups, though. -- David Winsemius, MD West Hartford, CT
Maybe Matching Threads
- subtraction based on two groups in a dataframe
- Plotting lines to sets of points
- Binning or grouping data
- hello, acts_as_ferret questions, any help greatly appreciate
- What is my replication unit? Lmer for binary longitudinal data with blocks and two treaments.