search for: xmax

Displaying 20 results from an estimated 157 matches for "xmax".

Did you mean: max
2010 Apr 04
4
ggplot2 geom_rect(): What am I missing here
...epresent the duration of the cycle (in months). In other words, all rectangles have coordinates (start, duration) and (end, duration). rr I've spent hours trying to figure out the documentation and pouring over Google and RSeek searches and am at an impasse. The documentation refers to xmin, xmax, ymin, and ymax but doesn't say anything about them. The only example gives them both as vectors, so I assume they refer to a sequence of coordinates in which each rectangle's vertices is given by (xmin[i],ymin[i]), (xmin[i],ymax[i]), (xmax[i],ymax[i]), and (xmax[i],ymin[i]). But when I...
2013 May 18
3
bar plot with non-zero starting level
Hi, I want to plot grouped bars to compare 95% confidence interval estimates from two models. Each bar represents a 95% confidence interval estimate of a coefficient from one of the two models. Each group represents confidence interval estimates of the same coefficient from the two models. I think such a bar plot will nicely present whether 95% confidence interval estimates of the same
2011 Apr 05
0
Changing parameter in local fdr R code
...;sigma", "p0") } rownames(fp0) = c("thest", "theSD", "mlest", "mleSD", "cmest", "cmeSD") fp0["thest", 1:2] = c(0, 1) fp0["theSD", 1:2] = 0 imax <- seq(l)[l == max(l)][1] xmax <- x[imax] if (length(pct0) == 1) { pctup <- 1 - pct0 pctlo <- pct0 } else { pctlo <- pct0[1] pctup <- pct0[2] } lo0 <- quantile(zz, pctlo) hi0 <- quantile(zz, pctup) nx <- length(x) i0 <- (1:nx)[x > lo0 &...
2011 Jul 31
2
memory problem; Error: cannot allocate vector of size 915.5 Mb
...(16467,0xa0421540) malloc: *** mmap(size=960004096) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug In the code that I run (next lines), if I do not include the last three lines it runs perfectly, if I exclude operations to create the xMax again it runs perfectly, if I include both G.search and xMax appears the error term. Does anyone knows the solution of this problem or why this problem happens? The code that I run is: N<-250 x<-matrix(c(rnorm(N,-1.5,1), rnorm(N,1,1), rbinom(N,1,0.5)), ncol=3) start<-(-1) end<-3 step&...
2013 Mar 22
4
ggplot2 will not draw a rectangle. Error: ggplot2 doesn't know how to deal with data of class XXX"
...L, 263114L, 274370L, 282955L, 282352L, 278092L)), .Names = c("year", "federal.ps"), class = "data.frame", row.names = c(NA, -13L)) p <- ggplot(fcs, aes(year, federal.ps )) + geom_line() p + geom_rect(data=rect, aes(xmin=xmin, xmax = xmax, ymin=-Inf, ymax = Inf), fill='red', alpha=0.2) ##=============End Code========================== sessionInfo() R version 2.15.3 (2013-03-01) Platform: i686-pc-linux-gnu (32-bit) locale: [1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_C...
2008 Jul 30
1
read XML
...The file have this structure: <?xml version="1.0" encoding="UTF-8" ?> - <layout> <name>Layout 2</name> <pagesByX>1</pagesByX> <pagesByY>1</pagesByY> - <elements> <legend refParent="r3" xmax="0.54156171284634758" xmin="0.020151133501259435" ymax="0.31480598161051165" ymin="0.042461931948864044" /> <component background="auto" border="none" borderDegMinSec="false" borderEachPage="true" borderFont=&...
2005 Jul 03
2
over/under flow
...e that I am porting is best left intact--so I need to query R somehow to the value of OVER that causes exp(lgamma(OVER)) to equal Inf. On my system, exp(lgamma(171)) is about first to equal Inf. I asked similar question a few weeks ago on exp(OVER) and got the answer back as log(.Machine$double.xmax). I now have the lgamma involved. I think that answer is what is OVER such the .Machine$double.xmax = lgamma(OVER), but I am not sure how to invert or solve for OVER Thanks.
2006 Jul 10
2
Setting the colors of lines in a trellis plot...
...plot( panel = panel.superpose, log10(states) ~ size, groups=category, data=data, type='b', lwd = 2, par.settings = list(superpose.symbol=mysymbols), ylim=c(y_min, y_max), scales = list(tck=c(1, 0), axs="r", x=list(tick.number=(xmax - xmin + 1), at=xmin:xmax, labels=xmin:xmax, cex=1.75), y=list(axs="r", rot=c(90, 0), labels=y_labels, at=y_at, cex=1.75 ) ), key = list ( text = list(levels(data$category)), lin...
2007 Jun 04
2
Abstract plot
I want to make a plot, but instead of showing _numerical_ values, I would like to show _symbolic_ values. For example, I want to plot a function y = a x + b, where x varies between Xmin and Xmax. I would like the plot to show, in the x-axis, the strings Xmin and Xmax, instead of their numeric values. Is it possible? Alberto Monteiro
2008 Apr 22
3
Using the 'by' function within a 'for' loop
...std<-sd(x$k) n<-length(x$k) se<-std/sqrt(n) lowb<-mn-se upb<-mn+se data.frame(tx=x$tx[1],day=x$day[1],mn=mn,std=std,lowb=lowb,upb=upb,se=se) }) summ<-do.call("rbind",summ) #Definining x axis range xmax<-unique(max(summ$day,na.rm=TRUE)) xmin<-unique(min(summ$day,na.rm=TRUE)) yaxmin<-unique(min(summ$lowb)) yaxmax<-unique(max(summ$upb)) plot(1,1,type='n',xlab='Day',xlim=c(xmin,xmax),ylim=c(yaxmin,yaxmax), ylab=k, las=1,cex.lab=1,xaxp=c(xmin,xmax...
2014 Jun 15
2
abline; setting plot limits
Relatively new user with a question regarding abline. I want to draw a st. line fit to some data but I want the line to span the range of the x-data and NOT the plot limits. In short the line spans xmin to xmax(of plot axis) but I want it to span xmin to xmax (of x data). Can this but done with abline or do I have to use lines and construct the line from a+bx? Paul Rydelek, Ph.D. 5232 Dorset Dr. Memphis, TN 38117
2009 Sep 17
2
R functions with array arguments
...vector > Mabslim <- c(-17.95, -16.65, -17.27, -17.62, -16.76, -17.07, -17.02) # Define function > schech<-function(x,alpha,xstar) (10^(0.4*(alpha+1)*(xstar- x))*exp(-10^(0.4*(xstar-x)))) # Define new function integrating the previous one > my_gamma<-function(alpha,xstar,xlim,xmax) integrate(schech,xmax,xlim,alpha,xstar)$value > my_gamma(-1,-21,Mabslim,-27) [1] 2.487746 Note that 'Mabslim' is used as an upper integration limit within the function. I tried to use "sapply(....)" but it looks to me as if this can be used only if the array is the fi...
2011 Nov 15
2
break error bars in ggplot2
...es including CIs as horizontal errorbars. I get an error when the scale limits are narrower than the boundaries of the error bar and hence the CIs are not plotted. library(ggplot2) df <- data.frame(resp=c(1,2), k=c(1,2), se=c(1,2)) ggplot(df, aes(resp,y=k)) + geom_point() + geom_errorbarh(aes(xmax = resp + se, xmin = resp - se)) + scale_x_continuous(limits=c(-1,3)) Is there a way to plot the errorbars anyway? Setting xmax to the scale limit is not so good, I guess, because you couldn't determine whether the CI is wider than the scale limits or not. Thanks a lot, Best, Felix Dr. re...
2000 Aug 26
0
Re: [R] too large alpha or beta in dbeta ? (PR#643)
...a look. fixed for R-devel (1.2 unstable), and the patch is --- src/nmath/dbeta.c 2000/03/03 17:18:30 1.7 +++ src/nmath/dbeta.c 2000/08/25 16:16:35 1.8 @@ -30,7 +30,15 @@ #ifdef IEEE_754 /* NaNs propagated correctly */ if (ISNAN(x) || ISNAN(a) || ISNAN(b)) return x + a + b; + +# define xmax 171.61447887182298/* (fixme) -->> ./gammalims.c */ + +#else + static double xmax = 0; double xmin; + if (xmax == 0) + gammalims(&xmin, &xmax); #endif + if (a <= 0 || b <= 0) ML_ERR_return_NAN; if (x < 0 || x > 1) @@ -35,10 +43,13 @@ if (x < 0 |...
2000 Aug 28
0
Re: [R] too large alpha or beta in dbeta ? (PR#643)
...a look. fixed for R-devel (1.2 unstable), and the patch is --- src/nmath/dbeta.c 2000/03/03 17:18:30 1.7 +++ src/nmath/dbeta.c 2000/08/25 16:16:35 1.8 @@ -30,7 +30,15 @@ #ifdef IEEE_754 /* NaNs propagated correctly */ if (ISNAN(x) || ISNAN(a) || ISNAN(b)) return x + a + b; + +# define xmax 171.61447887182298/* (fixme) -->> ./gammalims.c */ + +#else + static double xmax = 0; double xmin; + if (xmax == 0) + gammalims(&xmin, &xmax); #endif + if (a <= 0 || b <= 0) ML_ERR_return_NAN; if (x < 0 || x > 1) @@ -35,10 +43,13 @@ if (x < 0 |...
2002 Jan 25
2
selecting clusters of points
All: Are there any functions out there for selecting all the points in a region of a plot. I envision something like the identify() function except one could circle a cloud of points (and perhaps a vector would be returned of the same length as the points plotted indicating logical membership in the circled cloud). Perhaps someone has done something with the locator() function that would
2004 Sep 24
3
Error with repeat lines() in function
...: Error in ans[[1]] : subscript out of bounds This always occurs after the second lines command, and doesn't happen with all of my data points (some do not have errors). Any ideas? Thanks, Sean function(x,annot,rat1,rat2,rf,...) { par(las=2) wh <- which(annot[,5]==x) xmax <- max(annot[wh,4]) xmin <- min(annot[wh,3]) chr <- annot[wh,2][1] wh.rf <- rf$chrom==as.character(chr) & rf$txStart>xmin & rf$txEnd<xmax par(mfrow=c(2,1)) plot(annot[wh,3],rat1[wh],type="l",xlab="",ylab="log2 Ratio&quo...
2003 Aug 27
4
Newbie graphing questions
Hi everyone. R is new to me and I'm very impressed with its capabilities but still cannot figure out how to do some basic things. There seems to be no lack of documentation but finding what I need has proven difficult. Perhaps you can help. Here's what I'm after: 1. How do I create a new plot without erasing the prior one i.e., have a new window pop up with the new graph?
2011 Jan 11
0
modified FAST Script from package SensoMineR for the R community - Reg
...call } else coord.ellipse <- NULL if (!is.null(ellipse.par)) { coord.ellipse.par <- ellipse.par$res npoint.ellipse.par <- ellipse.par$call } else coord.ellipse.par <- NULL if (is.null(xlim)) { xmin <- xmax <- 0 if (is.na(test.invisible[1])) xmin <- min(xmin, coord.ind[, 1]) if (is.na(test.invisible[1])) xmax <- max(xmax, coord.ind[, 1]) if (!is.null(res.mfa$ind.sup) & is.na(test.invisible[2])) xmin &lt...
2000 Dec 14
2
Accuracy problem in dchisq for non-central chi-squared
Hi, I think I have identified a inaccuracy in dchisq when the non-centrality parameter is non-zero and large. Here's a little test: sys.dchisq.test <- function(N = 100000,mean = 0) { z <- rnorm(N,mean = mean, sd = 1) x <- z^2 xmin <- min(x) xmax <- max(x) br <- seq(xmin,xmax,length = 101) dbr <- br[2]-br[1] hist(x,br) p <- dchisq(br,df = 1,ncp = mean^2) * dbr lines(br,N*p) } par(mfrow = c(2,1)) sys.dchisq.test(mean = 10) sys.dchisq.test(mean = 15) Here's my version information: platform Windows arch x86...