Displaying 1 result from an estimated 1 matches for "binify".
2003 May 28
1
Numbers that look equal, should be equal, but if() doesn't see as equal (repost with code included)
...y unusual, although perhaps possible. If your eally
know what you're doing, maybe you should disable this check!?.");
}
ret <- c();
for ( i in 1:length(data))
{
rt <- data[i];
b <- 0;
while ( b < bins )
{
ret <- c(ret, rt);
b <- b+1;
}
}
ret;
}
binify <- function(data, bins, n)
{
if ( bins < 2 )
{
stop("Number of bins is smaller than 2. Nothing to split, exiting.");
}
if ( length(data) < 2 )
{
stop("The length of the data is really short. Is that ok?");
}
if ( bins * n != length(data) )
{
stop("C...