[R] 95% confidence intercal with glm

2010-09-28 Thread zozio32
Hi I had to use a glm instead of my basic lm on some data due to unconstant variance. now, when I plot the model over the data, how can I easily get the 95% confidence interval that sormally coming from: > yv <- predict(modelVar,list(aveLength=xv),int="c") > matlines(x

Re: [R] A problem with plotting a long expression in ylab ?

2010-09-28 Thread Tal Galili
Hi Barry, Sorry for not being clear. "Not work" == "Doesn't add the text to the ylab" My initial example was intended with no line breaks. Here it is again with variations: plot(1) title(ylab = expression(paste("test ln

Re: [R] A problem with plotting a long expression in ylab ?

2010-09-28 Thread Barry Rowlingson
On Tue, Sep 28, 2010 at 10:03 AM, Tal Galili wrote: > Hello, > > It seems that there is a problem when plotting an expression in the ylab of > a plot in case it is too long. > > Example: > > plot(1) > title(ylab = "test > looo

[R] A problem with plotting a long expression in ylab ?

2010-09-28 Thread Tal Galili
Hello, It seems that there is a problem when plotting an expression in the ylab of a plot in case it is too long. Example: plot(1) title(ylab = "test looong ") # work plot(1) title(ylab = expression(paste("test (% of 360" *d

Re: [R] One-sided CUSUM / MOSUM Tests?

2010-09-28 Thread Achim Zeileis
On Mon, 27 Sep 2010, bo...@hsu-hh.de wrote: Dear R-help list members, I have the following question concerning the strucchange()-package: is it possible to get the boundaries for one-sided (upper / lower) CUSUM and MOSUM tests? Not out of the box, at least not exactly. You can do this: lib

Re: [R] How to convert SEXP to double

2010-09-28 Thread Romain Francois
Le 28/09/10 08:43, Dmitrij Kudriavcev a écrit : Hello All, A simple question. I get some return from the R in my C++ program (via Rcpp package). The result come, as SEXP and it should be a simple numeric variable. How to convert it to double? The code, what i use: stringstream ss; ss<< "p<

Re: [R] Regular expressions: offsets of groups

2010-09-28 Thread Michael Bedward
What Titus wants to do is akin to retrieving capturing groups from a Matcher object in Java. I also thought there must be an existing, elegant solution to this some time ago and searched for it, including looking at the sources (albeit with not much expertise) but came up blank. I also looked at t

Re: [R] calculating mean and s.d. from a two-column table

2010-09-28 Thread Jim Lemon
On 09/28/2010 02:34 AM, Jonas Josefsson wrote: I have a two-column table as follows where age is in the 1st column and the number of individuals is in the 2nd. age;no 1;21 2;31 3;9 4;12 5;6 Can I use mean() and sd() to calculate the mean and standard deviation from this or do I have to manuall

Re: [R] hcluster with linkage median

2010-09-28 Thread Kennedy
Thank you Peter for your help. I had tried hclust before but I made the mistake of using the D matrix above instead of a dist object. Hence library(flashClust) d <- as.dist(D) # Clustering using hclust hc <- hclust(d, method = "median",members=NULL) # Clustering using flashClust fc

[R] How to convert SEXP to double

2010-09-28 Thread Dmitrij Kudriavcev
Hello All, A simple question. I get some return from the R in my C++ program (via Rcpp package). The result come, as SEXP and it should be a simple numeric variable. How to convert it to double? The code, what i use: stringstream ss; ss << "p <- predict(fit_ar11, n.ahead = 2, doplot=FALSE);"

Re: [R] max length of a factor variable

2010-09-28 Thread Richard Mott
Thanks I eventually tracked down the problem to something unrelated to this question (one out of the millions of character strings happened to be "NA" by chance, which of course was parsed as a missing value, breaking the code a long way downstream.) Richard On 28/09/2010 04:01, Michael

<    1   2