search for: x_vals

Displaying 4 results from an estimated 4 matches for "x_vals".

2009 Mar 25
2
Grouping Numbers
Ugh...This should be very simple, but evidently I am not searching for the proper term. Given the below: val_size<-100000 x_vals<-rnorm(val_size) I would like to group them according to the following x_vals_mean_tmp[1]<-mean(x_vals[1:10]) x_vals_mean_tmp[2]<-mean(x_vals[11:20]) ... x_vals_mean_tmp[n]<-mean(x_vals[99991:100000]) Then, I would like to group them according to the following x_vals_mean_tmp[1]<-...
2009 Mar 24
2
Properly labeling abline with text?
...I guess I am curious if there is a preferred procedure for labeling the abline. Is there a way to "fill" the text label and also put a box around the text label? I guess I would also like to have the box around the text match the abline format. Thank you for any info or insights. x_vals<-1:1000 y_vals<-rnorm(1000) plot(x_vals, y_vals) top_label<-paste("Top Label = ", format(max(y_vals), digits=2), sep="") abline(h=max(y_vals), col="darkred") text(max(x_vals), max(y_vals), top_label, pos=2) bottom_label<-paste("Bottom Label = "...
2009 Jun 26
3
Automatically placing a legend in an area with the most white space...
...d like to try to apply that R package to the contrived example shown below, so thank you for any hints or tips that can be provided. x = seq(0, 1000, by = 1) y1_vals<-rnorm(1000, mean = 0, sd = 50) y2_vals<-rnorm(1000, mean = 25, sd = 40) y3_vals<-rnorm(1000, mean = 115, sd = 40) plot(x_vals, y1_vals, pch=22, col="dark red", bg = "dark red", cex =0.3) points(x_vals, y2_vals, pch=22, col="dark blue", bg = "dark blue", cex =0.3) points(x_vals, y3_vals, pch=22, col="dark green", bg = "dark green", cex =0.3) abline(h=0, col=&quot...
2012 Sep 27
3
problem with nls starting values
Hi I would like to fit a non-linear regression to the follwoing data: quantiles<-c(seq(.05,.95,0.05)) slopes<-c( 0.000000e+00, 1.622074e-04 , 3.103918e-03 , 2.169135e-03 , 9.585523e-04 ,1.412327e-03 , 4.288103e-05, -1.351171e-04 , 2.885810e-04 ,-4.574773e-04 , -2.368968e-03, -3.104634e-03, -5.833970e-03, -6.011945e-03, -7.737697e-03 , -8.203058e-03, -7.809603e-03, -6.623985e-03,