search for: yleft

Displaying 20 results from an estimated 35 matches for "yleft".

Did you mean: left
2010 Aug 25
3
approxfun-problems (yleft and yright ignored)
...nterpolated onto present/absent p-values (y) between 0 and 1 using the *approxfun - function*{stats}; when I have used R version 2.8, everything had worked fine, however, after updating to R 2.11.1., I got unexpected output (explained below). Please correct me here, but as far as I understand, the yleft and yright arguments set the extreme values of the interpolated y-values in case the input x-values (on whose approxfun is applied) fall outside range(x). So if I run approxfun with yleft=1 and yright=0 with y-values between 0 and 1, then I should never get any values higher than 1. However, this i...
2009 Jul 21
1
bug in approx crashes R
Dear R-devel, The following line crashes R > approx(1, 1, 0, method='const', rule=2, f=0, yleft=NULL, ties='ordered')$y Process R:2 exited abnormally with code 5 at Tue Jul 21 14:18:09 2009 > version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 2 minor 9.1 year 200...
2005 Aug 16
2
quirky behavior from rbinom (PR#8071)
...Submission from: (NULL) (129.98.60.134) This seems strange. I have a small block of code that repeatedly calls rbinom. I put a break in there in case it returns NaN, as I've been having problems with this. Here is a transcript from the debug session: Browse[1]> theP [1] 1 Browse[1]> yleft[dataIndex] [1] 3 Browse[1]> rbinom(1,3,1) [1] 3 Browse[1]> rbinom(1,yleft[dataIndex], theP) [1] NaN Strange, huh?
2004 Mar 17
0
Plot 2 time series with different y axes (left and right)
...gt; I am not really a R specialist but for this task I use function: and he pasted his code into the email. I reindented the code, and wrote a fragment to experiment with it. Here it is: --------------------------------------------------------------------------- plot.yy <- function(x, yright, yleft, yleftlim=NULL, yrightlim = NULL, xlab = NULL, yylab=c("",""), pch=c(1,2), col=c(1,2), linky=F, smooth=0, lwds=1, length=10, format="%d-%H:%M", ... )...
2017 Nov 23
2
adding percentage secondary y-axis
...t; Sent: 23 November 2017 16:22:39 To: Eliza Botto; r-help at r-project.org Subject: RE: adding percentage secondary y-axis Hi It is usually not recommended but if you insist maybe library(plotrix) ?twoord.plot twoord.plot(lx=D[,1],ly=D[,2], rx=D[,1], ry=D[,3]) or plot.yy(x=D[,1],yright=D[,3], yleft=D[,2]) which allows only one x axis (see below). Cheers Petr plot.yy <- function (x, yright, yleft, yleftlim = NULL, yrightlim = NULL, xlab = NULL, yylab = list(NA, NA), pch = c(1, 2), col = c(1,2), linky = F, smooth = 0, lwds = 1, length = 10, format = "%d/%m", rect...
2017 Nov 23
0
adding percentage secondary y-axis
Hi It is usually not recommended but if you insist maybe library(plotrix) ?twoord.plot twoord.plot(lx=D[,1],ly=D[,2], rx=D[,1], ry=D[,3]) or plot.yy(x=D[,1],yright=D[,3], yleft=D[,2]) which allows only one x axis (see below). Cheers Petr plot.yy <- function (x, yright, yleft, yleftlim = NULL, yrightlim = NULL, xlab = NULL, yylab = list(NA, NA), pch = c(1, 2), col = c(1,2), linky = F, smooth = 0, lwds = 1, length = 10, format = "%d/%m", rect...
2008 Jul 20
3
asp and ylim
...in the above code. With asp not set, R plays close attention to the value of ylim. This is not intuitive behaviour, or is it? How can I set the aspect ratio, and simultaneously set the plot region? The aspect ratio is one number and the plot region is given by four numbers (xleft, xright, yleft, yright). Logically, these 5 numbers are independent of each other and arbitrary, provided xleft<xright and yleft<yright. This should give a one-to-one bijection between 5-tuples and plots, determined up to a change of scale that is uniform in the x- and y-dirctions. My code above sho...
2017 Nov 23
2
adding percentage secondary y-axis
Dear useRs, I have this dataset (D) with three columns. > dput(D) structure(c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 2.990484802, 3.005018792, 3.019552781, 3.03408677, 3.048620759, 3.063154749, 3.077688738, 3.092222727, 3.106756717, 3.121290706, 3.135824695, 3.150358684, 3.164892674, 3.179426663, 3.193960652, 3.208494642, 3.223028631, 3.23756262,
2003 Jan 20
3
Plotting w/multiple y-axes?
How do I plot using multiple(2) y-axes? I have two series that use the same x-data, but have very different scales. Appreciate any feedback, Per Bak
2004 Feb 24
5
r: plots
hi all i have another probably simple question. I have three variables say x, y and z. x and y are quite large and z is relative small. how can one plot the three variables on the same graph with two separate axis? (one for x and y and the other for z) e.g. x<-c(101,110,150,167,120) y<-c(120,135,175,95,200) z<-c(0.001, 0.15, 0.6, 0.8, 1) regards Allan
2009 Mar 18
0
modification of the function ecdf
...z<-x[x<=k[2]] z<-z[z>=k[1]] n <- length(x) if (n < 1) stop("'x' must have 1 or more non-missing values") vals <- unique(z) rval <- approxfun(vals, cumsum(tabulate(match(x, vals)))/n, method = "constant", yleft = 0.1, yright = 0.9, f = 0, ties = "ordered") class(rval) <- c("ecdf", "stepfun", class(rval)) attr(rval, "call") <- sys.call() rval }** (I also tried it with yleft = 0, yright = 1, it gave the same error) But appearently it is wrong and...
2002 Jun 17
3
Second axis in a plot
Hi to all, First of all, I prefer to tell that I am a R-newbie, so I apologize if this is a silly question (I have tried looking in the manuals, but without luck). I have two variables, y and z, that I want to plot against x in the same plot. I have done this before, using points() after plot(). But now the problem is that y and z are in different units of measurement, and their ranges are very
2007 Mar 15
1
How to use result of approxfun in a package?
...but without having the package redo the creation of function f1. The value of approxfun is a function; for example, I have > f1 function (v) .C("R_approx", as.double(x), as.double(y), as.integer(n), xout = as.double(v), as.integer(length(v)), as.integer(method), as.double(yleft), as.double(yright), as.double(f), NAOK = TRUE, PACKAGE = "base") $xout <environment: 0x17719324> I don't really understand how this is stored, and in particular, how I should handle it so as to include the function f1 in a package. I would like the users to be able t...
2005 Nov 02
2
help with the coordinates of the ECDF object
...Fn12 print(knots(Fn12), dig=2) 12*Fn12(knots(Fn12)) ## ~= 1:12 if there were no ties summary(Fn12) summary.stepfun(Fn12) print(ls.Fn12 <- ls(env= environment(Fn12))) ##[1] "f" "method" "n" "x" "y" "yleft" "yright" ############# Example by ?ecdf My objetive seems to this: plot(Fn12) identify( x = knots(Fn12), y = ??????????, labels="my string set") or text... thanks in advanced klebyn
2006 Jul 17
3
information about a function
...tion answered in the official R FAQ or docs. I have simply something like this: > f<-approxfun(data[,1],data[,2]) and f is: > f function (v) .C("R_approx", as.double(x), as.double(y), as.integer(n), xout = as.double(v), as.integer(length(v)), as.integer(method), as.double(yleft), as.double(yright), as.double(f), NAOK = TRUE, PACKAGE = "base")$xout <environment: 02106C24> I also used "locPoly". Both yield either a function or a data frame of values. Is there a way to get a mathematical representation of the function, e.g. a polynomial of an...
2002 Jun 11
5
Different y-axes
Hi All, I have checked everything I could find abot graphics, but still cannot solve the problem. Are there any ways to make a graph that plots two lines and two different y-axes, each of them has a scale that is related to the respective line. For example, y1 has a range 1:50 and y1 ranges 0:1. The x-axe is the same for both. Thank you in advance. --- Gregor Gawron
2004 Oct 17
3
ecdf with lots of ties is inefficient (PR#7292)
Full_Name: Martin Frith Version: R-2.0.0 OS: linux-gnu Submission from: (NULL) (134.160.83.73) I have large vectors containing 100,000 to 20,000,000 numbers. However, they only contain a few hundred *distinct* numbers (e.g. positive integers < 200). When I do ecdf(v), it either runs out of memory, or it succeeds, but when I plot the ecdf with postscript, the output is unnecessarily bloated
2011 Feb 08
1
help on stepfunction
Dear members, I would like a help for extracting the values from a step function (stepfun). >From help(stepfun) we have the following example: Y0<-c(1.,2.,4.,3.) y0<-c(1.,2.,3.,4.) sfun<-stepfun(1:3,y0,f=0) plot(sfun) Now, suppose instead I was given the object (*sfun*, say) from which I wanted to extract the values generated by the function *stepfun*. More precisely, I want to
2007 May 30
1
Sort in ecdf
...x <- sort(x) n <- length(x) if (n < 1) stop("'x' must have 1 or more non-missing values") vals <- sort(unique(x)) rval <- approxfun(vals, cumsum(tabulate(match(x, vals)))/n, method = "constant", yleft = 0, yright = 1, f = 0, ties = "ordered") class(rval) <- c("ecdf", "stepfun", class(rval)) attr(rval, "call") <- sys.call() rval --- [/R-code] --- I think one of the two calls to sort can be removed, improving the performance....
2013 Feb 14
1
approxfun values
...60 NA 7 70 2 8 80 6 9 90 9 10 100 NA > testinterpolationvalues<-approxfun(testinterpolation,y=NULL) > testinterpolationvalues function (v) .C(C_R_approxfun, as.double(x), as.double(y), as.integer(n), xout = as.double(v), as.integer(length(v)), as.integer(method), as.double(yleft), as.double(yright), as.double(f), NAOK = TRUE, PACKAGE = "stats")$xout <bytecode: 0x33ffab84> <environment: 0x34072eac> > testinterpolationvalues<-approx(testinterpolation,y=NULL) > testinterpolationvalues $x [1] 10.00000 11.63265 13.26531 14.89796 16.53061 18.1...