Re: [R] Polygon

2018-10-21 Thread David L Carlson
I think this does what you want. z1<- -1 z2<- 2 oldp <- par(mgp=c(3, .5, 0)) curve(dnorm(x,0,1), xlim=c(-5, 5),main="Standard Normal", xaxt="n", frame=F, xlab="") jj<-seq(z1,z2,0.01) cord.x<- jj cord.y<- dnorm(jj) polygon(c(-1, cord.x, 2), c(0, cord.y, 0), col="skyblue") axis(1,at=c(-5,z1,0,z

Re: [R] Polygon

2018-10-21 Thread Steven Yen
David, Rui, and All: Greetings. 1. I need a helping hand with the polygon statement below so that I can have the area under the curve highlighted, between (z1,z2). 2. Is it possible to label the X-axis with in two scale, in the current z-scale and another, say x = (z+5)*2? Thank you. z1<- -1 z2<

Re: [R] studio server on High SIerra

2018-10-21 Thread Marc Girondot via R-help
I post long time ago a post on my blog about this: https://max2.ese.u-psud.fr/epc/conservation/Girondot/Publications/Blog_r/Entrees/2014/8/3_Install_RStudio_server_on_Marverick_MacOSX.html You could try using this base. Marc Le 21/10/2018 à 05:12, Fuchs Ira a écrit : Can I run Rstudio Server o

Re: [R] integral of the fuction for each value

2018-10-21 Thread Tobias Fellinger
Hi, I'm not entirely sure what you want to calculate. If you want to integrate by u in the interval from 0 to 4 for every value of x I would suggest something like this: x <- rnorm(10,0,1) f <- function(u,x){ exp((x-u)) } sapply(x, function(i){ integrate(f,lower=1,upper=4, x=i)$value })

[R] integral of the fuction for each value

2018-10-21 Thread malika yassa via R-help
hello please you help me i have this functionx<-rnorm(10,0,1)f<-fuction(u,x)  {exp((x-u)}I want to calculate the integral of this function for each value of x{for(i in 1:lenght(x)integrate(f,lower=1,upper=4) thinks [[alternative HTML version deleted]] __