search for: bincount

Displaying 17 results from an estimated 17 matches for "bincount".

Did you mean: mincount
2013 Apr 11
0
Notes and warnings in building a package ('ms-dos style file name', 'no visible binding' and using .C("bincount", ..., PACKAGE = "base"))
...: no visible binding for global variable 'whistles' The thing is that I used this in subset'ing a data frame that is supposed to contain a variable called 'whistles': something like subset(x, whistles > 100) Should one avoid using `subset` in a package? 3. I used .C("bincount", PACKAGE="base") to count some frequencies in a long vector. This was considerably quicker than with `table` but gives a warning when building a package. "Foreign function call with 'PACKAGE' argument in a base package: .C("bincount", ..., PACKAGE = "...
2008 Feb 10
1
Error while using fitdistr() function or goodfit() function
...operly too.But your code is more efficient.Now,problem comes at next stage.When I apply fitdistr() for continuous data or goodfit() for discrete data I get following error.I am not able to remove that error.Please help me if you can. > Errors are as follows: > library(vcd) > gf<-goodfit(binCount,type= "nbinomial",method= "MinChisq") > Warning messages: > 1: NaNs produced in: pnbinom(q, size, prob, lower.tail, log.p) > 2: NaNs produced in: pnbinom(q, size, prob, lower.tail, log.p) > 3: NaNs produced in: pnbinom(q, size, prob, lower.tail, log.p) > 4: NaN...
2001 Feb 01
1
minor psy.c modifications
...oisemedian=_ogg_malloc(n*sizeof(float)); p->noiseoffset=_ogg_malloc(n*sizeof(float)); p->tonecurves[i]=_ogg_malloc(P_LEVELS*sizeof(float)); 3. modified bark_noise_median(): 3/a: floating point based (new) style: #define BIN(x) ((int)((x)*negFour)) #define BINdB(x) ((x)*negQuarter) #define BINCOUNT (200*4) #define LASTBIN (BINCOUNT-1) tatic void bark_noise_median(long n,float *b, float *f,float *noise, float lowidth,float hiwidth, int lomin,int himin,...
2001 Jan 27
1
optimization to bark_noise_median()
...the final OS X which will have something 2.95 based. If this doesn't hurt performance on x86 or some other platform or have some other problem, could you please commit it? Thanks! -tim /* quarter-dB bins */ #define BIN(x) ((int)((x)*negFour)) #define BINdB(x) ((x)*negQuarter) #define BINCOUNT (200*4) #define LASTBIN (BINCOUNT-1) tatic void bark_noise_median(long n,const float *b,const float *f,float *noise, float lowidth,float hiwidth, int lomin,int himin, const float *thresh,const float *off){...
2004 Oct 18
0
Increasing computiation time per column using lapply
Hi, Would be very glad for help on this problem. Using this code: temp<-function(x, bins, tot) { return(as.numeric(lapply(split(x, bins), wtest, tot))); } wtest <- function(x, y) { return(wilcox.test(x,y)$p.value); } rs <- function(x, bins) { binCount <- length(split(x[,1], bins)); tot <- as.numeric(x); result<-matrix(apply(x, 2, temp, bins, tot), nrow=binCount, byrow=F); rownames(result)<-names(split(x[,1], bins)); colnames(result)<-colnames(x); return(result); } where x is a matrix and bins is the grou...
1997 Dec 23
0
R-beta: bug in hist() (0.60/0.61)
...# breaks = `nclass' if (is.na(breaks) | breaks < 2) stop("invalid number of breaks") breaks }) } nB <- length(breaks) counts <- .C("bincount", as.double(x), n, as.double(breaks), nB, counts = integer(nB - 1), NAOK = FALSE)$counts if (any(counts < 0)) stop("negative `counts'. Internal Error in C-code for \"bincount\"") if (is.null(freq)) fr...
1998 Jan 23
2
hist: rel.freqs
In R0.61, In hist(), should the line rel.freqs <- counts/(sum(x) * diff(breaks)) computing the relative frequencies or height of the rectangles in a histogram not be rel.freqs <- counts/(sum(counts) * diff(breaks)) instead, or do I misunderstand something? Thanks, Philippe -- -------------------------------------------------------- Philippe Lambert Tel:
1998 Nov 26
1
Saving memory usage -- .C(....., DUP = FALSE) danger?
...s a bit astonishing given that I still have room for 214000 double's > u1 <- runif(50000) > u2 <- runif(50000) > gc() free total Ncells 96534 200000 Vcells 114006 250000 debug(hist.default) quickly revealed that the error was produced when .C("bincount",....) was called. Looking at the help, help(.C) and then at the "DUP = TRUE" default argument to .C(.), I was reminded that every argument is first copied before being passed to bincount(). Setting the "DUP = FALSE" argument in hist.default made it work with the above...
1997 Oct 30
2
R-alpha: Minor plotting problems
1) There's a curious asymmetry between points and lines, in that you can do lines(...,type='p') but not points(...,type='l') (and more importantly, not points(..., type='b'), which probably *could* arise in real work) This isn't deliberate, is it? 2) Did I remember to report the adverse effect of having plot(x,y) coerce its argument to numeric? Several of my
2008 Feb 10
2
Error in optim while using fitdistr() function
Hello, I am trying to fit distribution for data consisting of 421 readings.It is basically no of requests arrived per minute.It contains many 0 entries as no of requests.When i use fd<-fitdistr(V2,"gamma") I get following error: Error in optim(x = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, : initial value in 'vmmin' is not finite What should I do ? I need
2000 Jul 09
1
Modified Histogram functions
...min.n=1, eps.corr = 2) nB <- length(breaks) if(nB <= 1) { ##-- Impossible ! stop(paste("hist.default: pretty() error, breaks=",format(breaks))) } } storage.mode(x) <- "double" storage.mode(breaks) <- "double" counts <- .C("bincount", x, n, breaks, nB, counts = integer(nB - 1), right = as.logical(right), include= as.logical(include.lowest), NAOK = FALSE, DUP = FALSE, PACKAGE = "base") $counts...
2010 Mar 30
1
hist.default()$density
Dear developers, the current implementation of hist.default() calculates 'density' (and 'intensities') as dens <- counts/(n*h) where h has been calculated before as h <- diff(fuzzybreaks) which results in 'fuzzy' values for the density, see e.g. > tmp <- hist(1:10,breaks=c(-2.5,2.5,7.5,12.5),plot=FALSE) > print(tmp$density,digits=15) [1]
2008 Feb 11
0
Testing for differecnes between groups, need help to find the right test in R. (Kes Knave)
...ger with some mean value. If I understand your code correctly, you are trying to put your data into k bins of width f<-(max(V1)-min(V1))/k. In that case I would think something like this would work more efficiently: m<-min(V1); k<-floor(1 + log2(length(V1))); f<-(max(V1)-min(V1))/k; binCount<-NULL; for(i in seq(length=k)){ binIndex<-which((m+(i-1)*f<V1)&(V1<m+i*f)); binCount[i]<-sum(V2[binIndex]); }; where i becomes the index of time intervals. Hope it helps. Sincerely, Jason Q. McClintic r-help-request at r-project.org wrote: > Send R-help mailing list s...
2007 Jan 30
1
Solaris 10 compilation issue
...lm Undefined first referenced symbol in file cg_ registration.o ch_ registration.o rg_ registration.o rs_ registration.o bincount registration.o inflate connections.o Rf_df arithmetic.o Rf_dt arithmetic.o Rf_pf arithmetic.o Rf_pt arithmetic.o Rf_qf...
2007 Jan 30
1
Difficulty with compiling R-2.4.1 on solaris 10
...lm Undefined first referenced symbol in file cg_ registration.o ch_ registration.o rg_ registration.o rs_ registration.o bincount registration.o inflate connections.o Rf_df arithmetic.o Rf_dt arithmetic.o Rf_pf arithmetic.o Rf_pt arithmetic.o Rf_qf...
2007 Jan 30
0
R Compiling issue
...fai -lfsu -lsunmath -lmtsk -lm ../extra/zlib/libz.a ../extra/bzip2/libbz2.a ../extra/pcre/libpcre.a ../extra/intl/libintl.a -lreadline -ltermcap -lnsl -lsocket -ldl -lm Undefined first referenced symbol in file cg_ registration.o ch_ registration.o rg_ registration.o rs_ registration.o bincount registration.o inflate connections.o Rf_df arithmetic.o Rf_dt arithmetic.o Rf_pf arithmetic.o Rf_pt arithmetic.o Rf_qf arithmetic.o Rf_qt arithmetic.o Rf_rf random.o Rf_rt random.o chol_ registration.o gzeof connections.o do_syssleep names.o R_EditFiles platform.o R_getProcTime memory...
2007 Jan 30
0
Issue with compiling R on solaris 10
...lm Undefined first referenced symbol in file cg_ registration.o ch_ registration.o rg_ registration.o rs_ registration.o bincount registration.o inflate connections.o Rf_df arithmetic.o Rf_dt arithmetic.o Rf_pf arithmetic.o Rf_pt arithmetic.o Rf_qf...