search for: rvar

Displaying 7 results from an estimated 7 matches for "rvar".

Did you mean: rcar
2006 Mar 23
2
invalid variable type in model.frame within a function
Dear expeRts, I came across the following error in using model.frame: # make a data.frame jet=data.frame(y=rnorm(10),x1=rnorm(10),x2=rnorm(10),rvar=rnorm(10)) # spec of formula mf1=y~x1+x2 # make the model.frame mf=model.frame(formula=mf1,data=jet,weights=rvar) Which gives the desired output: > mf y x1 x2 (weights) 1 0.8041254 0.1815366 0.4999551 1.4957814 2 -0.2546224 1.9368141 -2.2373186 0.7579341 3...
2005 Mar 17
1
Cross validation, one more time (hopefully the last)
...gument 1 is not a vector My questions are, why doesn't this work, and how do I fix it. I'm using the formula function to create the formula that I'm sending to my function. And the mdata is a data.frame. I'm assumed that if I passed the column names as strings (response variable - rvar, fold variable - fvar) this would work. Apparently however it doesn't. Lastly, since I don't have access to MASS and there are apparently many examples of doing this kind of thing in MASS, could someone tell me if this function looks approximately correct? Thanks T ---------------------...
2015 Jun 23
4
[LLVMdev] Improving the quality of debug locations / DbgValueHistoryCalculator
...block BB. // This code is probably buggy because I didn't run it through a // compiler yet, but I hope it serves to illustrate my point. // Visit a machine instruction. transfer(MInsn) { // A DBG_VALUE marks the beginning of a new range. if (MInsn is a DBG_VALUE(var, loc)) { for ((rvar, start) : open_ranges[BB]) // A DBG_VALUE terminates a range started by a previous // DBG_VALUE for the same variable, if the described pieces // overlap. if (var == rvar && piece_overlaps(MInsn, start)) { ranges[var].push_back((start, MInsn)); open_r...
2005 Mar 18
2
logistic model cross validation resolved
...} myfacpred <- function(object, newdata) { ret <- as.factor(ifelse(predict.glm(object, newdata, type='response') < 0.5, 0, 1)) return(ret) } # logerrorest takes four arguments # mdata is a data frame holding the data to be modeled # form is the output of the is.formula function # rvar is the response variable as a string, for example 'birdx' # fvar is the fold variable, for example 'recordyear' logerrorest <- function(mdata, form, rvar, fvar) { require(Hmisc) require(ipred) # determine index of variables rpos <- match(rvar, names(mdata)) fpos <- match(...
2015 Aug 12
3
[LLVMdev] Improving the quality of debug locations / DbgValueHistoryCalculator
...times. Yes, we’ll have to benchmark it very carefully before deciding that the extra complexity is worth it. thanks for all the feedback -- adrian > transfer(MInsn) { > // A DBG_VALUE marks the beginning of a new range. > if (MInsn is a DBG_VALUE(var, loc)) { > > for ((rvar, start) : open_ranges[BB]) > // A DBG_VALUE terminates a range started by a previous > // DBG_VALUE for the same variable, if the described pieces > // overlap. > if (var == rvar && piece_overlaps(MInsn, start)) { > ranges[var].push_back((start...
2003 Mar 06
0
modifying ftable to allow percentages (wishlist) (PR#2606)
...used, the table would sum to 100 over the complete table. One further modification would be needed in order to use percentages in ftable.formula. Line 42 of ftable.formula, where ftable is called if (inherits(edata, "ftable") is true would have to be changed to ftable(data, row.vars = rvars, col.vars = cvars, ...) The ... argument would have to be added to pass pcnt= to ftable.default. These seem to me to be minor changes that would add a useful functionality to R. (Unless of course Guru[k] already has something much more sophisticated in the pipeline). Would it be a problem to imp...
2005 Feb 12
4
Is is possible to do "shorewall reject 1.1.1.1 tcp 25"
Hello, Is is possible to do "shorewall reject 1.1.1.1 tcp 25" ? So I can dynamically blacklist offensive smtp senders, but only have shorewall reject certain types (smtp) traffic from them? Thanks, Alex Martin http://www.rettc.com