search for: maxval

Displaying 20 results from an estimated 29 matches for "maxval".

2007 Aug 31
3
data frame row manipulation
Hello, struggling with the very basic needs... :( any help appreciated. #using the package doBY #who drinks how much beer per day and therefor cannot calculate rowise maxvals evaluation=data.frame(date=c(1,2,3,4,5,6,7,8,9), name=c("Michael","Steve","Bob", "Michael","Steve","Bob","Michael","Steve","Bob"), vol=c(3,5,4,2,4,5,7,6,7)) evaluation # maxval=summaryBy(vol ~ name,data=eval...
2005 Jul 05
0
lowess output looks wrong (PR#7891)
...d it under ID 4459. > > # Data to reproduce... > R <- c(3.0, 3.5, 4.5, 5.0, 10.0) > T <- R > T <- 1.5*T + 0.1*(T^2) > > # Bug in lowess (third y value is wrong in lowess output)... > xin <- log2(R) > yin <- log2(T) > minVal <- min (xin, yin) > maxVal <- max (xin, yin) > plot (xin, yin, xlim=c(minVal, maxVal), ylim=c(minVal, maxVal)) > lines (lowess(xin, yin, f = 2/3, iter = 3)) > text(3.5, 2, "3rd lowess point is wrong.", col="red") > text(3.5, 1.75, "Click for next graph.", col="red") >...
2012 Jan 10
1
error in Recursive
Hi I need help in the recursive problem. this is my code #Generate two random Numbers minval=20 maxval=100 cutoffValue=50 optVal<- function(cutoffValue,minval,maxval) { x=runif(2) x=x*cutoffValue for( i in 1:2) { if(x[i] < 30 || x[i] >60) # checking it falls between the range { optVal(cutoffValue,minval,maxval) } } return(x) } optVal(40,20,60...
2009 May 07
2
for loop vectorization
Hi, I am still not familiar with vectorization. Could you help with making this for loop more efficient? The code is trying to make a Q matrix for a multidimensional state space with specific conditions. thanks Mira tmp = 0:(maxvals[1]) for(i in 2:nchars) { tmp <- outer(tmp, 0:(maxvals[i]), FUN="paste", sep=".") } states = tmp stateidx = array(1:length(states), dim=dim(states)) transition <- matrix(data=0, nrow=length(states), ncol=length(states)) findstatedim <- function(x) which(stateidx==x,...
2010 Mar 06
2
memory error in for loop
...nd, r_fedforest, r_ffv, r_hiencrop, r_loencrop, r_maxfeed) #par(mfcol= c(5,5)) for (i in matrixlist){ ptable<-i[,-1]#create plot matrix w/o price point column ptable [is.na(ptable)] <- 0 #convert NA values to 0 maxval<-max(ptable) #create volume axis interval<-ceiling(maxval)/27 mgy<- seq(0,ceiling(maxval), by=interval) fprice <- c(i$price_point)#create price point axis #pdf(paste(i,"fuel_pw.pdf", sep=""), bg="white") matpl...
2007 Sep 04
4
Q: selecting a name when it is known as a string
...everywhere I could think of, I haven't been able to find the trick. I have this piece of code: ... attach(d) if (ORDINATE == 'ds') { lo <- loess(percent ~ ncms * ds, d, control=loess.control(trace.hat = 'approximate')) grid <- data.frame(expand.grid(ds=MINVAL:MAXVAL, ncms=MINCMS:MAXCMS)) ... then there several almost-identical "if" statements for different values of ORDINATE. For example, the next "if" statement starts with: ... if (ORDINATE == 'dsl') { lo <- loess(percent ~ ncms * dsl, d, control=loess.control(trace.hat =...
2008 Oct 06
3
horizontal boxplot + xlim
Hi there, I get a strange behaviour of a boxplot with the following code. There seems to be a problem with the xlim-parameter. Did I do anything wrong? What else can I do to force the boxplot to have a defined x-range? x <- rnorm(100) boxplot(x, notch=TRUE, xlab=parameter, xlim <- c(-4,4), horizontal = TRUE) Antje
2009 Sep 03
0
[LLVMdev] 2.6 pre-release1 ready for testing
...llvm make check : not possible under mingw (dejagnu...) > - clang make check fails : Note that we don't really expect clang to work on MinGW yet, as far as I know. > In the method DefineTypeSize, the call to sprintf is as follow : > sprintf(MacroBuf, "%s=%llu%s", MacroName, MaxVal, ValSuffix); > and should be transformed to : > sprintf(MacroBuf, "%s=%I64u%s", MacroName, MaxVal, ValSuffix); > as mingw toolchain don't support "%llu" marker. Fixed in SVN r80933. I don't know the status of clang on MinGW, so its hard for me to say whether i...
2009 Sep 03
2
[LLVMdev] 2.6 pre-release1 ready for testing
...bool, std::vector<char, std::allocator<char> >&) _sprintf The "faulty" call to DefineTypeSize is the 5th. The one which used a "long long" type. In the method DefineTypeSize, the call to sprintf is as follow : sprintf(MacroBuf, "%s=%llu%s", MacroName, MaxVal, ValSuffix); and should be transformed to : sprintf(MacroBuf, "%s=%I64u%s", MacroName, MaxVal, ValSuffix); as mingw toolchain don't support "%llu" marker. With this correction, clang seems to work on this platform. I wanted to provide a patch but I'm not able to find s...
2001 Jun 23
3
gcc 2.95.2/irix/Laguerre_With_Deflation/inifinte loop
I built ogg vorbis from the rc1 cvs source on Irix 6.5.12 with gcc 2.95.2. Using oggenc I encoded about 8,000 aiff files but found about a dozen where oggenc would go into an infinite loop. I tracked the problem with Laguerre_With_Deflation() as far back as logmask being Inf in floor0_forward. I'm now building gcc 3.0 with the expectation this is a compiler issue. If not, I'll back
2011 Nov 23
2
How to increase precision to handle very low P-values
Hello, Rlisters I have to compute p-values that are on the tail of the distribution, P-values < 10^-20. However, my current implementations enable one to estimate P-values up to 10^-12, or so. A typical example is found below, where t is my critical value. ########### example - code adapted from Rassoc ####################### rho01 = 0.5 rho105 = 0.5 rho005 = 0.5 t = 8 z = 2
2005 Sep 21
2
Help on optim
Dear R-help, I am new to optim function and need some help with optimization. Problem description: I am trying to optimize a weights vector such that it produce maximum value for a function maxVal. The optimization is subjected to constraint. The constraints are a) Min weight should be greater than or equal to Zero. b) Max weight should be less than or equal to 1 c) Sum of the weights should be equal to 1. Now after googling around a bit & trying my hands at RSiteSearch , I found that I...
2007 Feb 22
0
Error in solve.default
...X <- fit$x Y <- fit$y Terms <- fit$terms rss <- sum(wts * fit$residuals^2) levs <- hat(fit$qr) tau.rss <- (max(0, rss - fit$df.residual)/sum((1 - levs) * wts))^0.5 log.r <- if(tau.rss > 0) log(tau.rss) else log(taumin) maxval <- max1d(l.p.d.log.r, start = log.r, step = taumin/exp(log.r), x = X, y = Y, s.e. = s.e., df.se = df.se, prior = prior, ...) log.r <- maxval$x se.lr <- (2 * maxval$h)^(-0.5) g.h.v <- gauss.hermite.vals(log.r, se.lr, fast.calc) rho <- e...
2004 Aug 06
3
net/sock.c question
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi I have started to add bandwidth <limit> option to icecast. My ideea is to compute the current bandwidth by estimation on each sock_write*() call. Something like this: 1. initially we set kbps = 0, kbps_time = now and kbps_bytes = 0 2. after some time, a sock_write*() function is called which in turn calls sock_kbps_update(nobytes);
2012 Oct 02
2
problem about R
How to run pie chart for each categorical variable in a dataset?
2016 Apr 22
0
Finding Highest value in groups
Assuming your dataframe is in a variable x: > require(dplyr) > x %>% group_by(ID) %>% summarise(maxVal = max(Value,na.rm=TRUE)) On Fri, 2016-04-22 at 13:51 +0000, Saba Sehrish via R-help wrote: > Hi > > > I have two columns in data frame. First column is based on "ID" assigned to each group of my data (similar ID depicts one group). From second column, I want to identify h...
2016 Apr 22
2
Finding Highest value in groups
Hi I have two columns in data frame. First column is based on "ID" assigned to each group of my data (similar ID depicts one group). From second column, I want to identify highest value among each group and want to assign the same ID to that highest value. Right now the data looks like: ID Value 1 0.69 1 0.31 2 0.01 2 0.99 3 1.00 4 NA 4
2002 Jan 16
2
Subsetting data frames without a loop
I KNOW this should be easy, but I'm stuck. My data frame consists of multiple observations from each of a number of stations, and what I would like to do is create another data frame that contains all the variables of the first, but only rows where a certain variable is at its maximum for the station. So, for example: > my.df stn obs v 1 1 1 0.26400396 2 2 1
2007 Mar 23
1
objects of class "matrix" and mode "list"?
...Name1=rnorm(24*3),Name2=rnorm(24*3)) # define a function to get a set of descriptive statistics tmp <- function(x) { # this function will accept a data frame # and return a 1-row data frame of # max value, colname of max, min value, and colname of min return(data.frame(maxval=max(apply(x,2,max)), maxloc=names(x)[which.max(apply(x,2,max))], minval=min(apply(x,2,min)), minloc=names(x)[which.min(apply(x,2,min))])) } # Now applying function to data: # (1) split the data table by Day with split() # (2) apply the tm...
2009 Sep 02
0
[LLVMdev] 2.6 pre-release1 ready for testing
Hi Tanya, The sources weren't updated for this pre-release testing. So I had the same problems on PPC. -bw On Sun, Aug 30, 2009 at 10:50 PM, Tanya Lattner<lattner at apple.com> wrote: > LLVMers, > 2.6 pre-release1 is ready to be tested by the community. > http://llvm.org/prereleases/2.6/ > You will notice that we have quite a few pre-compiled binaries (of both > clang