similar to: ppoints

Displaying 20 results from an estimated 20000 matches similar to: "ppoints"

1997 Sep 25
2
R-beta: return()
I have a question on the use of return(). (Nothing on it in the docs I have) The test code below gives the error: Error: Object "x" not found when I do: thingy2(). How should it be fixed? Thanks very much for any help! (My original solution to this sort of problem was to use global variables x<<-... y<<-...) Bill Simpson ----------------------------- thingy<-function(k)
1998 Apr 27
1
R-beta: vectors in dataframe?
I have a file: x y z 0.025 0.025 1.65775 0.025 0.050 1.62602 0.025 0.075 1.63683 0.025 0.100 1.91847 0.025 0.125 2.00913 0.025 0.150 1.82222 0.025 0.175 1.70901 0.025 0.200 1.39759 0.025 0.225 1.39089 0.025 0.250 1.04762 If I read the file like this: data<-read.table("file.dat") How do I access the vectors x,y,z that are inside the dataframe data? I studied Venables and
2005 Jan 19
1
ppoints (PR#7538)
Dear r-bugs, Whilst playing with ppoints I discovered that when one uses it directly, occasional NA's in a vector also become data fractions: ppoints(c(1,2,NA,4)) Would it be a good idea to add a warning message as in: ppoints <- function (n, a = ifelse(n <= 10, 3/8, 1/2)) { if(any(is.na(n))) warning("'n' contains NA's") if(length(n) > 1) n <-
1998 Jan 07
1
R-beta: image
Questions on image: 1) How can I put labels on the x and y axes? 2) How to tell it to use e.g. 32 grey levels (not some colour map)? 3) How to know what the legend is (i.e. each grey level = what z value)? Thanks very much for any help. BTW I was wondering if persp was on the To Do list. That would be great! Bill Simpson
1998 Mar 12
2
R-beta: nonlinear fitting
Thanks very much Douglas for the pointer to nlm. Maybe the "Notes on R" maintainer can add at least a mention of nlm in the section on nonlinear fitting? I never did nonlinear fitting in S-Plus before, so I have nothing to unlearn, but I was hoping someone could show me how to do a least squares fit with nlm. example: x<-c(1,2,3,4,5,6) y<-.3*x^-.6 +.2 y<-y+rnorm(6,0,.01)
1998 Mar 12
2
R-beta: nonlinear fitting
Thanks very much Douglas for the pointer to nlm. Maybe the "Notes on R" maintainer can add at least a mention of nlm in the section on nonlinear fitting? I never did nonlinear fitting in S-Plus before, so I have nothing to unlearn, but I was hoping someone could show me how to do a least squares fit with nlm. example: x<-c(1,2,3,4,5,6) y<-.3*x^-.6 +.2 y<-y+rnorm(6,0,.01)
1998 Feb 26
3
R-beta: quantile
I do: x<-rnorm(1000) quantile(x,c(.025,.975)) 2% 98% -1.844753 1.931762 Since I want to find a 95% confidence interval, I take the .025 and .975 quantiles. HOWEVER R says I have the 2% (not 2.5%) and 98% (not 97.5%) points. Is it just rounding the printed 2% and 98%, or is it REALLY finding .02 and .98 points instead of .025 and .975? Thanks for any help. Bill Simpson
1998 Feb 26
3
R-beta: quantile
I do: x<-rnorm(1000) quantile(x,c(.025,.975)) 2% 98% -1.844753 1.931762 Since I want to find a 95% confidence interval, I take the .025 and .975 quantiles. HOWEVER R says I have the 2% (not 2.5%) and 98% (not 97.5%) points. Is it just rounding the printed 2% and 98%, or is it REALLY finding .02 and .98 points instead of .025 and .975? Thanks for any help. Bill Simpson
1998 Apr 03
1
R-beta: default paper size
After some paper clipping problems I checked options() and saw that the default paper size was a4; I need US Letter. So as per instructions I uncommented the R_PAPERSIZE line in config.site, R_PAPERSIZE=letter Restarting R, everything is still the same though. I guess I have to reinstall? That seems awkward. Is there a way a prompt ("a4 or letter paper?") can be inserted in the
1998 Oct 16
3
mean and sd of each serial position
I want to do something like this in R. If I have three vectors > a1 [1] 1 2 3 > a2 [1] 4 5 6 > a3 [1] 9 10 7 I want to compute 1. A vector that is the mean at each serial position of a1, a2, and a3. so in this example it would have the contents 4.667, 5.667, 5.333333 2. A vector that is the SD at each serial position of a1, a2, and a3. so in this example it would have the contents
1998 Jul 07
2
S speedup in R
Venables and Ripley describe a speedup where you take a structure like x<-NULL for(i in sequence) y<-c(y,function(x,i)) and convert it to one like x<-numeric(its length) for(i in sequence) y[i]<-function(x,i) I tried this speedup on some simple examples and it made them twice as fast. But now I am hitting a snag with some real code. This original version works:
1998 Apr 01
1
line plot with NA
I have the following data: intens<-c(28000,72000,120000,150000,180000,260000,310000) #Td peakcb<-c(1.2,2.5,2.7,3.7,5.6,6.2,6.8) #presses/s peakan<-c(0.5,3.7,5.1,5.8,7.4,NA,8.4) (See why I am using NA? I can work around this problem by using intensityan and intensitycb) Now do a plot of peakan: plot(intensity, peakan, pch=10,type="b") The plot skips the point (260000,NA),
1998 Mar 25
1
R-beta: qpois help
version .62: --------------------------------------------- > ?qpois The Poisson Distribution dpois(x, lambda) ppois(q, lambda) qpois(p, lambda) rpois(n, lambda) Arguments: x: vector of (positive) quantiles. p: vector of probabilities. n: number of random values to return. lambda: vector of positive means.
2006 Apr 13
2
Plotting positions in qqnorm?
Do you know of a reference that discusses alternative choices for plotting positions for a normal probability plot? The documentation for qqnorm says it calls ppoints, which returns qnorm((1:m-a)/(m+1-2*a)) with "a" = ifelse(n<=10, 3/8, 1/2)? The help pages for qqnorm and ppoints just refer to Becker, Chambers and Wilks (1988) The New S Language (Wadsworth & Brooks/Cole),
1998 Jan 16
1
R-beta: kill R Graphics window->crash R
I am running R-0.61.1 on linux under X. If I kill the R Graphics window (click on X box in upper right corner), then subsequently do x11(), R crashes. I find that things only work the right way if I close the graphics window using dev.off(). I was wondering if maybe it could be arranged that closing the graphics window via click would seem to R to be equivalent to typing dev.off(). BTW thanks
1998 Jul 03
1
R-beta: histogram
Can someone please tell me to make a density histogram? hist makes one with count or relative frequency on the y-axis. I want the density, which is (rel freq)/(bin width) In the help I see: intensities: values f^(x[i]), as estimated density values. If `all(diff(breaks) == 1)', they are the relative frequencies `counts/n' and in general satisfy
1998 Jul 03
1
R-beta: sum of squares and NAs
This surprised me. Is it the way it is supposed to be? > x<-c(1,2,3,4,5) > y<-c(1.2,1.3,1.4,1.5,NA) > x-y [1] -0.2 0.7 1.6 2.5 NA > (x-y)^2 [1] 0.04 0.49 2.56 6.25 NaN >>>so NA^2 = NaN? Why not still NA? > sum((x-y)^2) [1] NaN >>>yes that is reasonable So if you ever have a data set with missing observations (NAs), you can't do any nlm() least
1998 Jul 13
1
R-beta: accessing SEs from lm object
If I do fit<-lm(y~x) Is it possible to access the SE of the slope? (Analogous to getting the slope like this: fit$coef[2]) If not, it would be handy. (I want SE of 1/slope, and an approx way is fit$se[2]/(fit$coef[2]^2)) Thanks for any help. Bill Simpson -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
1998 Mar 11
1
R-beta: ms, nls, etc?
I tried to ?ms, ?nls and apparently these aren't implemented on R yet. However I seem to remember postings on this list having to do with fitting nonlinear models (no I don't mean GLM type fits, I have a REAL nonlinear model: y=ax^b + c). So please tell me if it is possible to fit nonlinear models in R (by least squares or ML). Thanks! Bill Simpson
1998 Sep 02
1
INSTALL
I just installed R 0.62.3 and it seems to me the INSTALL document is out of date. Now it seems it does it all "automatically", so the part in the doc below can be deleted: -------------------------------- INSTALLATION After ./configure make have been completed successfully, you can install the complete R tree to your system by typing make install ...