search for: yvals

Displaying 20 results from an estimated 91 matches for "yvals".

Did you mean: vals
2011 Jul 25
1
Problem with random number simulation
Hi this is my first post. I am trying to run a simulation for a computer playing Von Neumann poker and adjusting it's expectation of an opponent's behavior according to how the opponent plays. This program involves random generation of "hands" and shifting of parameters. However, when I run the code, no errors come up, but the program doesn't do anything. Could someone
2005 Jul 28
2
problem with an IF statement?
...ronly around the 'if' statement and gives me a directory listing. Thanks in advance Tom N.B. datan is an invented dataset xvals<-c(1,0.4,0.2) datan<-data.frame(s1=c(3,4,5),s2=c(5,5,5),s3=c(21,55,34),s4=c(5,3,2)) datan$sint<-NA datan$sgrad<-NA for(icount in 1:dim(datan)[1]) { yvals<-c(datan[icount,4],datan[icount,3],datan[icount,2]) if((is.na(yvals[1]) + is.na(yvals[2]) + is.na(yvals[3]))<2) { g<-lm(yvals~xvals) datan$sint[icount]<-g$coef[1] datan$sgrad[icount]<-g$coef[2] } }
2006 Mar 27
0
not a problem: a submission (PR#8714)
...NULL) (139.133.7.38) I think you should have better examples on the ?plot man page, if you don't mind me saying. Can I suggest something like this, which would probably stop so many emails to the R help about how to put on error bars Cheers, Toby M ****************************** xvalsT1=1:3 yvalsT1=c(10,20,30) errplusT1=c(2,3,4) errminusT1=c(9,8,7) xvalsT2=1:3 yvalsT2=c(30,35,40) errplusT2=c(12,13,14) errminusT2=c(1,2,3) treatment=c(rep("T1",times=length(xvalsT1)),rep("T2",times=length(xvalsT2))) xvals=c(xvalsT1,xvalsT2) yvals=c(yvalsT1,yvalsT2) errplus=c(errplusT1,errp...
2005 Sep 24
1
rpart Error in yval[, 1] : incorrect number of dimensions
I tried using rpart, as below, and got this error message "rpart Error in yval[, 1] : incorrect number of dimensions". Thinking it might somehow be related to the large number of missing values, I tried using complete data, but with the same result. Does anyone know what may be going on, and how to fix it? I have traced two similar error messages in the Archive, but following the
2008 May 27
5
Rotated text on a regression line
Dear all, I stumbled over a problem recently when trying to use srt with text() on a windows device. What I intended to do was to plot a simple regression line, and to rotate a piece of text such that the text has the same angle as the regression line. However, the text is always plotted in a slightly wrong angle: #### x=1:10 #create arbitrary x and y values y=x*2-rnorm(1:10)
2007 Feb 20
1
text.rpart for the "class" method doesn't act on label="yprob"
Hello All, Am I misreading the documentation? The text.rpart documentation says: "label a column name of x$frame; values of this will label the nodes. For the "class" method, label="yval" results in the factor levels being used, "yprob" results in the probability of the winning factor level being used, and ?specific yval level? results in the probability of
2003 Jul 12
2
help with bivariate density plot question
...nd corresponding plots as follows: new.data.normal<-data.normal[!is.na(data.normal[,2]),] x<-new.data.normal[,2] y<-new.data.normal[,3] op <- KernSur(x,y, xgridsize=50, ygridsize=50, correlation=0.4968023, xbandwidth=1, ybandwidth=1) #3D density plot persp(op$xvals, op$yvals, op$zden, theta=30,phi=10,expand=0.5,ltheta=120, xlab="TECH3661.A",ylab="TECH3661.B",zlab="Prob",col="pink", , main="3D DENSITY PLOT-TECH3661 ", sub=" TECH3661.A AND TECH3661.B", box = T, axes = TRUE,ticktype...
2000 Dec 15
1
resolution of windows metafiles
...ay)? Maybe metafiles have a coarse underlying resolution? The following code produces the problem (along with a postscript plot just to show that a smooth representation is possible): # PlotTest.R # 12/15/2000 # # Demonstrate some curiosities with windows metafiles xvals <- seq(0,1,length=101) yvals <- xvals^3 win.metafile(file="test.wmf",width=4,height=3.5, pointsize=12) plot(xvals,yvals,type="l") dev.off() postscript(file="test.eps",horizontal=FALSE,width=4,height=3.5, pointsize=12) plot(xvals,yvals,type="l") dev.off() windows(...
2007 Mar 01
1
Generating R plots through Perl
Hello, I am in the process of writing a Perl program to carry out and analyze large numbers of regressions using R as the regression engine, and I am using Statistics::R to create the communication bridge between the two programs. Statistics::R creates a pipe between R and Perl and uses Rterm.exe (hidden during run-time) to carry out the R commands. This communication bridge works well for
2004 Dec 20
1
evaluate expression on several dataframe columns
Hi R-users, I have a collection of dataframes and know how to build a string that refers to it, in this example, name_infra_alg_inc. Then, I have a character string yval, which the user can select from a drop down list. It contains the column names of the dataframes. assign(paste(name_infra_alg_inc, "ci", sep="."), ci(get(name_infra_alg_inc)[[yval]], confidence=0.95)) My
2005 Mar 15
0
need help with plot.rpart and text.rpart
Hi, I am new to R and need help with rpart. I am trying to create a classification tree using rpart. In order to plot the reults I use the plot function and the text function to label the plot of the tree dendrogram with text. The documentation of text.rpart says : "For the "class" method, label="yval" results in the factor levels being used, "yprob" results
2004 Jun 11
1
Error when I try to build / plot a tree using rpart()
Hi, I am using the rpart package to build a classification tree. I did manage to build a tree with data on a previous project. However, when attampting to build a tree on a project I am working on, I seem to be getting the error shown below: > nhg3.rp <- rpart(profitresp ~., nhg3, method="class") > plot(nhg3.rp, branch=0.4, uniform=T); text(nhg3.rp, digits=3) Error in
2010 Sep 29
2
R crashes when loading rgl package before minqa package
Hej, Calling newuoa (from the minqa package) makes R crash when the package rgl is loaded first. This however only on certain selected data. The data used for testing (saved to 'bugs.R'): xvals = c(1,2,4,5,7,8,9,10,11,12,14,15,16,18,19,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36) yvals = c(857.7597,975.8624,978.2655,979.3034,965.5919,983.8946,992.2512,992.1178,979.5379,974.4269,968.4113,991.5210,977.3361,985.7800,975.5220,974.6880,973.8102,980.7295,982.0034,984.7993,978.4948,970.4351,969.0718,983.7892,976.3637,980.7833,987.1665,976.6000,975.1332,971.0757,989.4693) initpar = c(-5...
2007 Aug 31
2
memory.size help
...below where I have multiple arrays that could be taking up space. Does anyone know a good way around this? w1 <- outer(xk$xk1, data[,x1], function(y,z) abs(z-y)) w2 <- outer(xk$xk2, data[,x2], function(y,z) abs(z-y)) w1[w1 > d1] <- NA w2[w2 > d2] <- NA i1 <- ifelse(!is.na(w1),yvals[col(w1)],NA) i2 <- ifelse(!is.na(w2),yvals[col(w2)],NA) zk <- numeric(nrow(xk)) #DEFININING AN EMPTY VECTOR TO HOLD ZK VALUES for(x in 1:nrow(xk)) { k <- intersect(i1[x,], i2[x,]) zk[x] <- mean(unlist(k), na.rm = TRUE) } xk$zk <- zk data <- na.omit(xk) -- View this message...
2002 Aug 28
0
user defined function in rpart
Hi, I am trying to use the rpart library with my own set of functions on a survival object. I get an immeadiate segmentation fault when i try calling rpart with my list of functions. I get the same problem with the logrank example from Therneau,s S-rpart library though their anova example works. Should I report this as a bug, as even if my functions are structured improperly, that should lead to
2006 Oct 21
0
tcltk: multiple listboxes, selection
...=1, to=length(xvals), by=2)) { tkinsert(tl.x, "end", xvals[[i]]) } tkselection.set(tl.x, 0) tkgrid(tl.x, sticky="news") # Y values frame.y <- tkwidget(tt, "labelframe", text = "Y value(s)") tl.y <- tklistbox(frame.y, height = 20, #length(yvals) / yvals.field.count, yscrollcommand=function(...) tkset(scr.y,...), width = 50, selectmode = "extended", background = "white") scr.y <- tkscrollbar(frame.y, repeatinterval = 5, command = function(...) tkyview(tl.y, ...)) for(i in seq(f...
2007 Jun 15
2
method of rpart when response variable is binary?
Dear all, I would like to model the relationship between y and x. y is binary variable, and x is a count variable which may be possion-distribution. I think it is better to divide x into intervals and change it to a factor before calling glm(y~x,data=dat,family=binomail). I try to use rpart. As y is binary, I use "class" method and get the following result. >
2008 Oct 27
0
Displaying number of Y/N affected by tree in rule form RE: R question/request on rules from rpart
Hi Prof. Williams, thanks for your suggestion. The updated code is below. It turns out it was a matter of displaying the second column in yval to get the number of N and subtracting it from the n column in the frame to get the number of Y remaining in a binary example. once this is added now the function returns the rules along with Y and N count affected by the resulting rule. I am ccing
2006 Oct 17
1
Some questions on Rpart algorithm
Hello: I am using rpart and would like more background on how the splits are made and how to interpret results - also how to properly use text(.rpart). I have looked through Venables and Ripley and through the rpart help and still have some questions. If there is a source (say, Breiman et al) on decision trees that would clear this all up, please let me know. The questions below pertain to a
2004 Sep 24
5
AW: How to improve the quality of curve/line plots?
Thanks for the tip using a smoothing technique before plotiing in order to get a curve instead of a line connecting the observations. But that's not the solution for my main problem with the "unclean" line plot. In order to show my problem let's take this simple example: > xval <- c(1, 2, 3, 4, 5, 6, 7, 8) > yval <- c(10, 30, 40, 50, 70, 90, 100, 110) > plot