similar to: Would like to add this to example for plotmath. Can you help?

Displaying 20 results from an estimated 200 matches similar to: "Would like to add this to example for plotmath. Can you help?"

2010 Mar 09
3
Shade area under curve
I want to shade the area under the curve of the standard normal density. Specifically color to the left of -2 and on. How might i go about doing this? Thanks -- View this message in context: http://n4.nabble.com/Shade-area-under-curve-tp1586439p1586439.html Sent from the R help mailing list archive at Nabble.com.
2008 Dec 31
3
Plotmath with values?
I hope to use the plotmath facility to print titles that mix math and values of R variables. The help for "plotmath" has an example, which after repeated reading, I find baffling. Likewise, I have read the help file for "substitute" (wqhich seems to be needed) without ever understanding what it does, other than being used in some magic incantations. I would like to do
2008 Apr 02
1
Trouble combining plotmath, bquote, expressions
I'm using R-2.6.2 on Fedora Linux 9. I've been experimenting with plotmath. I wish it were easier to combine expressions in plotmath with values from the R program itself. There are two parameters in the following example, the mean "mymean" and standard deviation "mystd". I am able to use bquote to write elements into the graph title like mu = mymean and R will
2010 Jul 06
1
plotmath vector problem; full program enclosed
Here's another example of my plotmath whipping boy, the Normal distribution. A colleague asks for a Normal plotted above a series of axes that represent various other distributions (T, etc). I want to use vectors of equations in plotmath to do this, but have run into trouble. Now I've isolated the problem down to a relatively small piece of working example code (below). If you would
2008 Apr 08
2
plotmath "overstrikes" in output on a Linux system
I've been testing plotmath. But I'm getting some funny output one one computer. The problem is that characters are 'jumbled' and overstrike when symbols are introduced. Sample code: mu <- 440.0 sigma <- 12.5 myx <- seq( mu - 4*sigma, mu+ 4*sigma, length.out=500) myDensity <- dnorm(myx,mean=mu,sd=sigma) # Here's one way to retrieve the values of mu and sigma and
2008 Jun 17
2
Accessing Max/Min Value of Density Function
Dear all, Currently I have the following output > mydensity <- density(x) > print(mydensity) x y Min. : -92.14 Min. :0.000e+00 1st Qu.: 356.66 1st Qu.:5.530e-09 Median : 805.45 Median :4.681e-05 Mean : 805.45 Mean :5.564e-04 3rd Qu.:1254.24 3rd Qu.:3.370e-04 Max. :1703.04 Max. :5.541e-03 How can I access the Max value of
2003 Apr 18
3
superimposing graphs
Dear People, I have a data set of data x from a probability distribution, and I have a function, mydensity, of the pdf of that distribution. I'm asking for help in superimposing the histogram of x and the plot of mydensity. In the function below, I call truehist and curve, but these are plotted in different figures. I'd like them to be plotted on the same figure, and to use common
2017 Sep 13
0
ggmap + geom_raster
Dear all, I want to : 1. Estimate a weighted 2D kernel. 2. Paint a heatmap on a ggmap. Here is some reproducible data / code (I got it from the internet) : s_rit <- structure(list(score = c(45, 60, 38, 98, 98, 53, 90, 42, 96, 45, 89, 18, 66, 2, 45, 98, 6, 83, 63, 86, 63, 81, 70, 8, 78, 15, 7, 86, 15, 63, 55, 13, 83, 76, 78, 70, 64, 88, 61, 78, 4, 7, 1, 70, 88, 58, 70, 58, 11, 45, 28, 42,
2003 Feb 20
3
outliers/interval data extraction
Dear R-users, I have two outliers related questions. I. I have a vector consisting of 69 values. mean = 0.00086 SD = 0.02152 The shape of EDA graphics (boxplots, density plots) is heavily distorted due to outliers. How to define the interval for outliers exception? Is <2SD - mean + 2SD> interval a correct approach? Or should I define 95% (or 99%) limit of agreement for data interval,
2010 Jan 27
1
control of scat1d tick color in plot.Predict?
Hi All, I have a quick question about using plot.Predict now that the rms package uses lattice. I'd like to add tick marks along the regression line, which is given by data=llist(variablename) in the plot call. The ticks show up fine, but I'd like to alter the color. I know the ticks are produced by scat1d, but after spending a fair bit of time going through documentation, it still
2005 Jun 16
1
AIC in glm.fit with intercept
Dear R users, glm.fit() gave me the same AIC's regardless of TRUE or FALSE intercept option. > myX <- as.matrix(1:10) > myY <- 3+5*myX > foo <- glm.fit(x=myX, y=myY, family = gaussian(link = "identity"), intercept=TRUE) > foo$aic [1] 38.94657 > foo <- glm.fit(x=myX, y=myY, family = gaussian(link = "identity"), intercept=FALSE) > foo$aic [1]
2011 Aug 18
1
Where are the ticks on grid.xaxis?
Hi R list, I like the default ticks that are set up using grid.xaxis() or grid.yaxis() with no arguments. Finding good values for the 'at' argument is usually not a trivial task; the default behavior of these functions seems to work well. The problem with this strategy is that I cannot figure out how to "recover" the positions of these ticks when you do NOT specify the
2009 Feb 19
1
Getting the difference between two data frames
Dear R users, I have the following data: x <- data.frame( myX = c(1,2,3,4,5,6,7,8,9) ) y <- data.frame( myX = c(1,2,3,4,5,6,7) ) How can I get the difference between data frame x and y? In this case, I want to get values 8 and 9 I know in SQL we can use minus operator, but I have no idea how to do so in R. I tried all.equal, diff, and identical, but they don't give me the actual data
2005 Jul 05
1
Kind of 2 dim histogram - levelplot
Dear R-List, I've written some code to put measurement values at a position x and y in bins (xb and yb). It works, but I wonder if there isn't a function that would do what I do by hand in "# fill data in bins"? Here is the code: # data x <- c( 1.1, 1.5, 2.3, 2.5, 2.6, 2.9, 3.3, 3.5 ) y <- c( 6.3, 6.2, 5.9, 5.3, 5.4, 4.2, 4.8, 4.6 ) val <- c( 50, 58, 32, 14, 12,
2006 Nov 24
1
Error in Calling C++ function from R!!!
Hello, I tried to call an external function of R from the following code in C++: void prodgdot(double *x, double *y, int *n, double *output) { int i; *output=0; for (i=0;i<*n;i++) { *output+=x[i]*y[i]; } } I compiled it using from my working directory in linux terminal and I think it's ok: giba at giba-desktop:~/mysrc/meus_testes_iniciais$ R CMD SHLIB
2008 Oct 29
1
How to set read.table variables to vectors?
The summary stats for the xin and yin variables below are correct. However, if I use plot(xin,yin), an exception is thrown saying that "object xin is not found." Also, it is apparent that I can't successfully replace the x and y vectors with values from xin and yin. The four plots on one panel are showing but the range of x and y is only [0,1], and therefore, it seems like an
2002 Mar 08
2
Sys.putenv environment variables disappear (PR#1371)
Environment variables set with Sys.putenv() disappear (i.e. become "") after a while, especially after heavy-duty I/O. Example: R> x <- matrix(1., 3000, 3000) R> save(x, file="myx.RData") R> Sys.putenv(HOME="/tmp") R> while (Sys.getenv("HOME") != "") {cat("ok\n"); load("myx.RData")} The loop prints
2001 Nov 30
0
Problems with environmental variables set with Sys.putenv
Environment variables set with Sys.putenv() "disappear" spontaneously (and somewhat randomly) when I load large datasets. This was reported in R-help by Dave Kane on June 4, 2001; I have not seen any further discussion. I'm not sure if I can report it as a "bug", since it is not entirely reproducible. Could someone try this and see if you have trouble too? The following
2009 Feb 06
0
Comparing weighted histograms?
I'm trying to plot and compare weighted histograms and I can't seem find where to start. I have data similar to this: Miles2LAX RADAM2005Pct LAWA2005Pct 35.57 .00123 .00684 24.74 .00118 .00187 27.09 .00965 .00876 16.23 .00587 .00397 { ...
2009 Jul 10
2
IF STATEMENTS
Hello, I am working on using if statements. What is the error message telling me here and how do I correct for it? I have tried various combinations of quotes. Thank you. Sincerely, Mary A. Marion #Find critical values crit<-function(n,alpha,type) { if (type==twoSided) { alpha2=alpha/2 tL<-qt(alpha2,n-1) tU<-qt(1-alpha2,n-1) } if (type==Lower) { tL<- -9999