Question: Write a function inRnamedcounts. This function should take as parameters a numeric vectorxand also a number indicating a number of binsn. The function will consider
Write a function inRnamedcounts. This function should take as parameters a numeric vectorxand also a number indicating a number of binsn. The function will consider the range [min(x),max(x)], and then consider a partition of this interval intonnon-overlapping equally sized half open intervals:I1= [min(x),b1),I2= [b1,b2),...,In= bn1,max(x)]. Note that since the intervals are equally sized, the value ofbiis constrained. The function will then return a vector of lengthnsuch that thei-th element of this vector is the number of coordinates ofxthat lie in the intervalIi.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
