Re: [R] Points inside a polygon

2012-01-12 Thread Rolf Turner
() in the spatstat package (after appropriately reconfiguring your polygons as objects of class owin; something like w - owin(poly=plygn) where plygn is your polygon). You could also use the undocumented function inside.xypolygon(). cheers, Rolf Turner

Re: [R] breakpoints and nonlinear regression

2012-01-17 Thread Rolf Turner
In respect of fitting piecewise linear regressions, have you looked at the segmented package? cheers, Rolf Turner On 18/01/12 04:30, crimsonengineer87 wrote: Dear Forum, I have been wracking my head over this problem for the past few days. I have a dataset of (x,y). I have been

Re: [R] fitting an exp model

2012-01-19 Thread Rolf Turner
) points(t,var) indicates a fairly reasonable fit. One wonders however about the validity of the model considering the lack of fit at t=0. R has great and easy-to-use graphics capabilities. Use them! cheers, Rolf Turner __ R-help@r

Re: [R] drop columns whose rows are all 0

2012-01-24 Thread Rolf Turner
columns of dataset have extra attributes tagging along. E.g. the column could actually be a numeric matrix of zeroes --- in which case it wouldn't get dropped. cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] read.table: how to ignore errors?

2012-01-24 Thread Rolf Turner
- list() j - 0 for(i in 2:length(xxx)) { tmp - read.csv(textConnection(xxx[i]),header=FALSE) if(ncol(tmp)==ncol(yyy)) yyy - rbind(yyy,tmp) else { j - j+1 bad[[j]] - tmp } } closeAllConnections() HTH cheers, Rolf Turner

Re: [R] percentage from density()

2012-01-27 Thread Rolf Turner
1.000951 with absolute error 0.00011, rather than giving exactly 1, so there's a bit of slop in the system. cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] problem in fitting model in NLS function

2012-02-01 Thread Rolf Turner
have no idea why nls() is throwing an error. * Your parameterisation is bad. * A better parameterisation can be readily fitted to your data using optimize(). * The model is probably too complicated and inappropriate for these data. HTH cheers, Rolf Turner On 01/02/12

Re: [R] dividing values of each column in a dataframe

2012-02-06 Thread Rolf Turner
, Rolf Turner On 07/02/12 08:54, Berend Hasselman wrote: On 06-02-2012, at 20:22, Abhishek Pratap wrote: Hey Guys I want to divide(numerically) all the columns of a data frame by different numbers. Here is what I am doing but getting a weird error. I don't think you are getting

Re: [R] I bet apply has a solution

2012-02-06 Thread Rolf Turner
No. This does not do anything like what the OP wanted. Did you ***try*** it, for crying out loud? cheers, Rolf Turner On 07/02/12 08:29, ilai wrote: duplicated(Data..) On Mon, Feb 6, 2012 at 11:34 AM, LCOG1jr...@lcog.org wrote: Hi all For the data below, I would like

Re: [R] MLEs using optim

2012-02-06 Thread Rolf Turner
* brackets (``[[ ]]'') when assigning a value to the i-th entry of your pre-defined list. (4) For efficiency it is probably best to use the estimates returned at step i as the starting values for step i+1. cheers, Rolf Turner __ R-help@r

Re: [R] SPATIAL QUESTION: HOW TO MAKE POLYGONS AROUND CLUSTERS OF POINTS AND EXTRACT AREAS AND COORDINATES OF THESE POLYGONS?

2012-02-06 Thread Rolf Turner
) V - tiles(tess(image=U)) lapply(V,centroid.owin) lapply(V,area.owin) You should read the help on the functions invoked above. It might be illuminating to do some plotting along the way (of X, Y, Z, U, and V). cheers, Rolf Turner

Re: [R] SPATIAL QUESTION: HOW TO MAKE POLYGONS AROUND CLUSTERS OF POINTS AND EXTRACT AREAS AND COORDINATES OF THESE POLYGONS?

2012-02-06 Thread Rolf Turner
It has been pointed out to me (in a private email) that there was a typo in my previous post; X - rpoisspp(100) should read X - rpoispp(100) (i.e. just one s). Sorry 'bout that! :-) cheers, Rolf __ R-help@r-project.org

Re: [R] How to store the p value and number of events into a matrix

2012-02-08 Thread Rolf Turner
and ones.) cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained

Re: [R] Reading in csv with footer

2012-02-12 Thread Rolf Turner
(3) brute force: x - readLines(filename) n - length(x) Having determined n, do: y - read.csv(filename,nrows=n-2) cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] Spline Question

2012-02-14 Thread Rolf Turner
David: Why do you say the OP wants a 503rd or 504th degree polynomial? He/she wants an interpolating spline. But that is precisely what spline() or splinefun() would give him/her. So I don't understand the problem either!!! To the OP: What did you actually *do* to create your spline?

Re: [R] Spline Question

2012-02-15 Thread Rolf Turner
and effort into providing helpful advice on this list, but is understandably put off by silly questions or failures to follow the posting guide. His efforts should be appreciated and applauded, not whined about. cheers, Rolf Turner __ R-help@r

Re: [R] save objects of own function to workspace

2012-02-15 Thread Rolf Turner
--- and it's pretty clear that at this stage of your development, you don't. cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org

Re: [R] graphs of gamma, normal fit to a histogram are about half as large as they should be

2011-05-13 Thread Rolf Turner
$post.f.crwn.length However, the height of the two curves are about 1/3 to 1/4 the height that they should be compared to the histogram. Any ideas? Yes. Read the help on hist! (Hint: Pay particular attention to the freq and/or probability arguments.) cheers, Rolf Turner

Re: [R] R won't start keeps crashing

2011-05-13 Thread Rolf Turner
On 14/05/11 02:28, Duncan Murdoch wrote: SNIP One way to end up with a corrupted workspace is to save it with a dependency on a particular package, then try to load it when that package is unavailable. I'm going to see if R can handle that case more gracefully. SNIP Pardon me for

Re: [R] R won't start keeps crashing

2011-05-13 Thread Rolf Turner
On 14/05/11 14:09, David Winsemius wrote: On May 13, 2011, at 9:09 PM, Rolf Turner wrote: On 14/05/11 02:28, Duncan Murdoch wrote: SNIP One way to end up with a corrupted workspace is to save it with a dependency on a particular package, then try to load it when that package is unavailable

Re: [R] R function that returns an object's search path position XXXX

2011-05-15 Thread Rolf Turner
On 15/05/11 13:41, Dan Abner wrote: Hello everyone, Is there an R function that returns an object's search path position? ?find cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] graphs of gamma, normal fit to a histogram are about half as large as they should be

2011-05-15 Thread Rolf Turner
. If that doesn't work, please provide a minimal *reproducible* (no one but you has the ``rwb'' data object) example of the problem that you are having (as the posting guide requests). cheers, Rolf Turner On 16/05/11 17:01, Benjamin Caldwell wrote: Hmm; still missing something - hist

Re: [R] princomp and eigen

2011-05-16 Thread Rolf Turner
is the sky blue? Why are fire engines red? Why don't they teach linear algebra these days?] Because if A%*%x = lambda*x then A%*%(-x) = lambda*(-x). cheers, Rolf Turner P. S. Why is a duck? Answer: Because the higher you go, the vest has no sleeves

Re: [R] R CMD check: no visible binding for global variable

2011-05-16 Thread Rolf Turner
value that you really want. You might try (the appropriate analogue of) x + get(annotIndex,envir=.GlobalEnv). That should satisfy the package checker. (I haven't tested it, but.) Dunno if this has an adverse impact on the efficiency of your code. HTH cheers, Rolf Turner

Re: [R] R CMD check: no visible binding for global variable

2011-05-16 Thread Rolf Turner
checker! :-) Might be more efficient than my suggestion of using ``get()''. cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

[R] Testing.

2011-05-16 Thread Rolf Turner
Please ignore this message. cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal

Re: [R] subsetting a list of dataframes

2011-05-17 Thread Rolf Turner
. Could someone suggest how to do this? I have come close to what I need with loops and such, but there must be a less clumsy way... L.new - L[tapply(L,nrow) 1] cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] R Style Guide -- Was Post-hoc tests in MASS using glm.nb

2011-05-18 Thread Rolf Turner
On 19/05/11 10:26, bill.venab...@csiro.au wrote: SNIP Most of [the Google style guide's] advice is very good (meaning I agree with it!) but some is a bit too much (for example, the blanket advice never to use S4 classes and methods - that's just resisting progress, in my view). SNIP I must

[R] Testing again.

2011-05-19 Thread Rolf Turner
Sorry for the noise. cheers, Rolf __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal,

Re: [R] recursive function

2011-05-19 Thread Rolf Turner
(1) What has this to do with recursion? (2) You probably need to use ifelse(). I believe that this is (in effect) an FAQ. cheers, Rolf Turner On 20/05/11 07:42, Tremblay, Pierre-Olivier wrote: Hi, I created a function for obtaining the normal cumulative distribution (I know

Re: [R] extraction of mean square value from ANOVA

2011-05-19 Thread Rolf Turner
a *vector* (of length 3 in your setting), the last entry of which is the error (or residual) mean square, which is probably what you want since you refer the ``mean square value'' (singular). cheers, Rolf Turner __ R-help@r-project.org mailing list

Re: [R] extraction of mean square value from ANOVA

2011-05-19 Thread Rolf Turner
suggests. cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained

Re: [R] identical function names from 2 packages

2011-05-20 Thread Rolf Turner
the command line will get the lm() in whichever package (teaser or stats) is closer to the start of the search path. And there's really nothing much that can be done about this. Have I got that right? cheers, Rolf Turner On 20/05/11 18:26, Jari Oksanen wrote: Duncan

Re: [R] identical function names from 2 packages

2011-05-20 Thread Rolf Turner
On reflection, it seems to me that what we really need here is Prof. Ripley's mind_read() function that was foreshadowed some years ago (see fortune(mind_read)) so that R could determine just *which* lm() (for example) function the user has in mind when he or she types ``lm(...)'' at the

Re: [R] unbalanced anova with subsampling (Type III SS)

2011-05-21 Thread Rolf Turner
and not Type III SNIP You ***really should*** have a look at www.stats.ox.ac.uk/pub/MASS3/Exegeses.pdf cheers, Rolf Turner [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] predict a MA timeseries

2011-05-23 Thread Rolf Turner
to apologize. Your English is better than my Deutsch. (The ``.at'' address *does* mean ``Austria'', nicht wahr?) HTH cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Analog of least significant difference error bars for proportions

2011-05-23 Thread Rolf Turner
. cheers, Rolf Turner [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented

Re: [R] Reading Data from mle into excel?

2011-05-23 Thread Rolf Turner
I think cognizance should be taken of fortune(very uneasy). cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

Re: [R] 3 Y axis possible?

2011-05-26 Thread Rolf Turner
of the appropriate terms to search on. Can anyone remember/point out where this discussion can be found? cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Observation in a confidence ellipse

2011-05-28 Thread Rolf Turner
. However if you want to use a sledge-hammer to crack a peanut, install the spatstat package and then do: require(spatstat) W - owin(poly=your ellipse) inside.owin(x1,x2,W) # Where x1 and x2 are the x and y coordinates of the points you wish to test. cheers, Rolf Turner

Re: [R] Markov Chain model coding

2011-05-28 Thread Rolf Turner
in the future dependant on the conditions during the observation. Any advice would be much appretiated. Have a look at the CRAN packages: * msm * HiddenMarkov * hmm.discnp cheers, Rolf Turner __ R-help@r-project.org

Re: [R] Please HELP

2011-05-31 Thread Rolf Turner
(1) Use an informative subject line. (2) Do not use html mail. Then you might get a response. cheers, Rolf Turner On 01/06/11 02:12, mustafabinar wrote: Hi R people. nbsp; I have a problem. What can I create by using functions the combinations ofnbsp;distances in multiple

Re: [R] Forcing a negative slope in linear regression?

2011-05-31 Thread Rolf Turner
any sense either. You present the values of only one variable. For a regression you need to have a y-variable and at least one x-variable. It would appear that you're not thinking very clearly. cheers, Rolf Turner On 01/06/11 11:32, J S wrote: Dear forum members, How can I force

Re: [R] weird error from MASS::eqcsplot with postscript driver

2011-06-01 Thread Rolf Turner
to specify height and width. cheers, Rolf Turner On 02/06/11 07:17, Michael Friendly wrote: [Env: R 2.12.2, Win XP] I'm creating figures using MASS::eqcsplot to provide equal scaling of the axes. My figures work OK when I plot to the screen, but when I try to do the same

Re: [R] shading in overlap between two ranges

2011-06-02 Thread Rolf Turner
(). cheers, Rolf Turner On 03/06/11 03:04, Graves, Gregory wrote: I have 2 datafiles 'target' and 'observed' as shown below (I will gladly email these 2 small files to whomever). X25. And X75. Indicate the value of 25th and 75th-percentile of the target ('what should

Re: [R] Use line break at scrip but avoid line break on graphics

2011-06-02 Thread Rolf Turner
think that plot(1,main=paste(, )) might do what you want. cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] Use line break at scrip but avoid line break on graphics

2011-06-02 Thread Rolf Turner
--- but ***not*** in the output! Your advice is the antithesis of what is required. cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

Re: [R] Problem with package development

2011-06-02 Thread Rolf Turner
, and is *not* the source of the OP's problems. Sarah Goslee has already pointed out what at least one of the sources of his problems is. cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] Problem with package development

2011-06-02 Thread Rolf Turner
On 03/06/11 12:16, Joshua Wiley wrote: Okay, that might have been a little strong. screams bloody murder is a warning, not technically an error, and does not occur when simply running R CMD build. That said, the OP did mention using R CMD check and pdflatex is not an issue when only building

Re: [R] barplot - change width of bar outline

2011-06-02 Thread Rolf Turner
around with calls to .Internal() !!!) and is pretty straightforward, so the hack won't be too hard to implement. Good luck. cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] barplot - change width of bar outline

2011-06-03 Thread Rolf Turner
in later graphics. cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self

Re: [R] Notes on R Objects

2011-06-03 Thread Rolf Turner
the object. I didn't find anything like this in the R docs. ?comment cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

Re: [R] Problem with package development

2011-06-03 Thread Rolf Turner
On 04/06/11 00:02, Barry Rowlingson wrote: SNIP . someone on StackOverflow was wondering why 0= x= 1 isn't a valid expression, neither in the context of what he expected (TRUE if x is between 0 and 1) nor how I explained it would function (as (0=x)= 1, and then comparing a TRUE/FALSE

Re: [R] LM/two way analysis/classic parametrisation

2011-06-05 Thread Rolf Turner
(13,7,9,3,6,6,3,1,11,5,15,5) p372- data.frame(trt,blk,res) fit- lm(res ~ trt + blk,data=p372) # DON'T use attach()! Use the data argument for lm(). summary(fit) cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] ANOVA with many IV's

2011-06-08 Thread Rolf Turner
). cheers, Rolf Turner On 09/06/11 16:14, Dennis Murphy wrote: Hi: You can try something like this: assuming the factor variables of interest and the response variable are in a data frame named df, ivset- c(comma separated vector of factor names) myaovs- lapply(ivset, function(x

Re: [R] Histogram

2011-06-09 Thread Rolf Turner
: Histogram I think the command you want is barplot x = rbinom(10,15,0.65) y = rbinom(10,15,0.25) barplot(rbind(x,y),beside=TRUE) RTFM. I.e. execute ?rbinom cheers, Rolf Turner __ R-help@r-project.org mailing list https

Re: [R] merge large number of raster objects

2011-06-10 Thread Rolf Turner
gone in circles on wildcard, lapply, and names threads and haven't managed to get anything to work. I think that outmap - do.call(merge,myobjects) should work for you. cheers, Rolf Turner __ R-help@r-project.org mailing list https

Re: [R] R program writing standard/practices

2011-06-10 Thread Rolf Turner
-code-style-guide/ cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self

Re: [R] change value in one cell

2011-06-11 Thread Rolf Turner
learn about factors; they are important and useful. cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

Re: [R] Trouble with compound functions---differential equations

2011-06-15 Thread Rolf Turner
(). As has been discussed recently on this list, the syntax for curve() is a bit delicate. A workaround for your problem is: plot(function(t){B1(T1,t)},0,3650) HTH cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] Hidden Markov Chains - mhsmm

2011-06-18 Thread Rolf Turner
(1) Repeatedly sending the same message to this list is not a good idea. (2) It would probably be most efficacious for you to contact the maintainer of the mhsmm package. Type maintainer(mhsmm) to find out who this is! cheers, Rolf Turner

Re: [R] Can mathematical formula be used in the help file of a R function or package?

2011-06-20 Thread Rolf Turner
Extensions -- Writing R Documentation Files -- Mathematics You need eqn{} and/or deqn{}. cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] Confidence interval from resampling

2011-06-28 Thread Rolf Turner
intervals, is to be found in Theoretical comparison of bootstrap confidence intervals, Peter Hall, Annals of Statistics vol. 16 no. 3 1988, pp. 927 -- 953. cheers, Rolf Turner __ R-help@r-project.org mailing list https

Re: [R] Derivative of a function

2011-06-28 Thread Rolf Turner
(1) You really ought to do your own homework. (2) What has this to do with R? cheers, Rolf Turner On 29/06/11 14:03, Lisa wrote: Dear all, I just want to get the derivative of a function that looks like: y = exp(x1*b) / (exp(x1*b) + exp(x2*b)) where y is a scalar, x1, x2

Re: [R] Derivative of a function

2011-06-29 Thread Rolf Turner
does not do automatically. cheers, Rolf Turner D(expression(exp(x1*b) / (exp(x1*b) + exp(x2*b))), b) exp(x1 * b) * x1/(exp(x1 * b) + exp(x2 * b)) - exp(x1 * b) * (exp(x1 * b) * x1 + exp(x2 * b) * x2)/(exp(x1 * b) + exp(x2 * b))^2 See ?D and also note deriv on the same help

Re: [R] Sum Question

2011-06-30 Thread Rolf Turner
The simplest way is: xxx - with(clyde,tapply(CONTTIME,SCRNO,sum)) You could also do: xxx - by(clyde,clyde[[SCRNO]],function(x){sum(x[[CONTTIME]])}) but this gives somewhat messy output; the aforesaid output may be convenient for some purposes, not for others. cheers, Rolf

Re: [R] Have problem to do loop to generate transformed chi-squared variates

2013-01-07 Thread Rolf Turner
Homework? We don't do people's homework for them. cheers, Rolf Turner On 01/08/2013 05:13 AM, Agnes Ayang wrote: Hello R-helpers, I need to generate standard variates normal to 'create' chi-squared variates. To make you more understand, (1) a-rnorm(3,0,1) *after do (1), I

Re: [R] piece-wise linear regression nls function

2013-01-10 Thread Rolf Turner
, Rolf Turner On 01/10/2013 02:33 PM, John Sorkin wrote: windows 7, R 2.12 I am trying to run a piecewise linear regression with a single knot, i.e. a regression composed of two straight lines where the two lines intersect at an x value given by the variable knot. I wish to estimate the slope

[R] Problem with inconsolata font (again) --- on Fedora 17 this time.

2013-01-10 Thread Rolf Turner
available. I also tried sudo yum install texlive-fonts-extra with a similar result. Can anyone give me a simple recipe as to how to get the inconsolata font and the associated inconsolata.sty? Thanks. cheers, Rolf Turner __ R-help@r

[R] A problem with X11 headers/libs.

2013-01-11 Thread Rolf Turner
, and when I did sudo yum install libX11-devel.x86_64 I was told that this package was also already installed. What do I do to make the headers/libs available please? cheers, Rolf Turner P. S. Is there a way to get a binary version of R-patched for Fedora 17, e.g. by using yum

Re: [R] Access comonents in lists of lists

2013-01-11 Thread Rolf Turner
. Also associated functions like tapply() and sapply(). Very useful gadgets. And if you really get hooked on such functionality, you might want to have a look at the plyr package. cheers, Rolf Turner __ R-help@r-project.org mailing list

Re: [R] A problem with X11 headers/libs.

2013-01-11 Thread Rolf Turner
On 01/12/2013 12:41 AM, Prof Brian Ripley wrote: On 11/01/2013 11:28, Milan Bouchet-Valat wrote: Le vendredi 11 janvier 2013 à 22:45 +1300, Rolf Turner a écrit : I am trying to build R-patched from source on a (newly installed) Fedora 17 system on a new laptop. When I do the usual ./configure

Re: [R] (SOLVED) Problem with inconsolata font (again) --- on Fedora 17 this time.

2013-01-11 Thread Rolf Turner
#TeX_Live_2012_2 I haven't actually *tried* that, given that I had got things working and didn't dare do anything that might put my system back into bozo mode! :-) Again, thanks to all who proffered advice. cheers, Rolf Turner __ R-help@r

[R] Another X11 problem. (Psigh!)

2013-01-11 Thread Rolf Turner
methods base other attached packages: [1] spatstat_1.30-0 deldir_0.0-21 mgcv_1.7-22 misc_0.0-15 loaded via a namespace (and not attached): [1] grid_2.15.2 lattice_0.20-10 Matrix_1.0-10 nlme_3.1-105 [5] tools_2.15.2 cheers, Rolf Turner

Re: [R] Another X11 problem. (Psigh!)

2013-01-12 Thread Rolf Turner
On 01/13/2013 04:36 AM, Marc Schwartz wrote: On Jan 11, 2013, at 10:35 PM, Rolf Turner rolf.tur...@xtra.co.nz wrote: Tried to do a plot just now and got an error: Error in text.default(2, 6, main, cex = cex) : X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 1 at size 16 could

Re: [R] Interpreting coefficients in linear models with interaction terms

2013-01-12 Thread Rolf Turner
mean when A is at level 1 and B is at level 1, and so on. Suppose mu_11 = 1, mu_12 = -1, mu_21 = -1, and mu_22 = 1. Then there are no main effects; A averages to 0, as does B. But there is an elephant-ful of interaction. cheers, Rolf Turner cheers, Rolf Turner On 01/13

Re: [R] getting TukeyHSD code

2013-01-12 Thread Rolf Turner
Hi Erin, What you're missing is that the TukeyHSD function is generic. There seems to be only one method for it, namely TukeyHSD.aov. Try typing: methods(TukeyHSD) On my system if I type TukeyHSD.aov I see a splendiferous amount of lovely --- and (mirabile dictu!) reasonably

Re: [R] One sided confidence limits for the regression line

2013-01-14 Thread Rolf Turner
=confidence,level=0.90) plot(x,y) lines(x,pfit[,fit]) lines(x,pfit[,upr],col=red) You are then, for any given x value, 95% confident that the true mean of Y lies *below* the corresponding y-value on red curve that was plotted. cheers, Rolf Turner

Re: [R] Confidence intervel for regression line

2013-01-14 Thread Rolf Turner
On 01/15/2013 09:17 AM, li li wrote: Hi all, For the simple linear regression, I want to find the input x value so that the lower confidnece limit is a specific number, say 0.2. In other words, I want to find the value of x so that the lower confidence bound crosses the horizontal line

Re: [R] readJPEG function cannot open jpeg files

2013-01-15 Thread Rolf Turner
On 01/15/2013 08:04 AM, Duncan Murdoch wrote: SNIP I've never understood why Microsoft thinks it is good to display incomplete filenames. This practice causes so many problems. SNIP Personally, I never understand Why Microsoft?. cheers, Rolf Turner

Re: [R] Line breaks in documentation \useage

2013-01-17 Thread Rolf Turner
, but all of these produce warnings or errors. The \usage{} section appears to be treated verbatim or as if it were preformated. So just put the line break literally in your *.Rd and it will automagically appear in the resulting help. cheers, Rolf Turner

Re: [R] how to use ...

2013-01-17 Thread Rolf Turner
The help facility is applicable to functions and data sets. It is not designed or intended to give help with respect to R syntax (with the exception of the basic syntax of the operators --- unary and binary --- and the associated rules of precedence). cheers, Rolf Turner

Re: [R] change confidence interval line length in barplot2 (plotrix package)

2013-01-22 Thread Rolf Turner
There does not appear to be any such function as barplot2 in the current version (3.4-5) of the plotrix package. Moreover I can find no reference to such a function in the NEWS for plotrix. cheers, Rolf Turner On 01/23/2013 07:28 AM, Martin Batholdy wrote: Hi, is there any way

Re: [R] problems with coercing a factor to be numeric

2013-01-23 Thread Rolf Turner
Given that your labels are no and yes, what do you expect R to do? To quote a well-known fortune, R is lacking a mind_read() function! cheers, Rolf Turner On 01/23/2013 10:58 PM, Francesco Sarracino wrote: Thanks, this works! but I am surprised that R has such a strange behavior

Re: [R] problems with package 'segmented'

2013-01-25 Thread Rolf Turner
as to whether the result returned is sensible. It is also possible that the fix I have suggested will induce other problems in other contexts; I don't really understand what's going on well enough to be certain. I hope that this is of some help, but. cheers, Rolf Turner On 01/12/2010

Re: [R] confidence / prediction ellipse

2013-01-28 Thread Rolf Turner
,col=red) cheers, Rolf Turner On 01/27/2013 10:12 AM, Giuseppe Amatulli wrote: Hi, I'm using the R library(car) to draw confidence/prediction ellipses in a scatterplot. From what i understood the ellipse() function return an ellipse based parameters: shape, center, radius . If i

[R] R-help archives --- are they up-to-date?

2013-01-29 Thread Rolf Turner
I just saw a message from David Winsemius, responding to an inquiry from Carol White: On Jan 28, 2013, at 9:06 PM, carol white wrote: Should I understand that this message was received? It's always possible to check the Archives for this question. This prompted me to ask about a problem

Re: [R] export figure by pdf command

2013-01-29 Thread Rolf Turner
I was going to attempt to answer your question, but I refuse to respond to anyone who writes wanna when they mean want to. The use of wanna is unacceptable in written English unless you are *trying* to be funny, and I don't think you are. cheers, Rolf Turner On 01/30/2013 09:48 AM

Re: [R] ccf (cross correlation function) problems

2013-01-29 Thread Rolf Turner
, Rolf Turner On 01/29/2013 11:26 PM, Larissa Modica wrote: Hello everybody, I am sorry if my questions are too simple or not easily understandable. I’m not a native English speaker and this is my first analysis using this function. I have a problem with a cross correlation function and I

Re: [R] R-help archives --- are they up-to-date?

2013-01-29 Thread Rolf Turner
On 01/30/2013 10:28 AM, Sarah Goslee wrote: The searchable archives may lag, and apparently do. The main list archive is here: https://stat.ethz.ch/pipermail/r-help/ and is complete. That's the one to check if you wish to know whether something made it to the list. If you go to the r-help

Re: [R] points rejected as lying outside the specified window

2013-01-29 Thread Rolf Turner
that it's difficult to say what your problem is without having access to your actual data. cheers, Rolf Turner On 01/30/2013 09:29 AM, Abby Rudolph wrote: Hello, I am using the following code to create ppp files from csv data and map shape files, but I am getting some errors which I

Re: [R] How does predict() calculate prediction intervals?

2013-01-30 Thread Rolf Turner
Just look at the code of predict.lm(). It is reasonably perspicuous. In particular look at res.var. cheers, Rolf Turner On 01/31/2013 05:50 AM, Kurt Rinehart wrote: For a given linear regression, I wish to find the 2-tailed t-dist probability that Y-hat = newly observed values

Re: [R] spatial analysis

2013-01-31 Thread Rolf Turner
more detail. cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained

Re: [R] Help calculating p-values

2013-02-01 Thread Rolf Turner
This smacks of homework to me. cheers, Rolf Turner On 02/02/2013 12:45 PM, Jin Choi wrote: I am trying to figure out how to calculate p-values for the difference in prevalence of a risk factor between men and women. For example, I find that 277 out of 710 male patients and 125

Re: [R] R -HELP REQUEST

2013-02-05 Thread Rolf Turner
, ., Y-hat_{N+10} = Y-hat_{N+9} + Z-hat_10. In R, let your forecast values be the vector Zhat (a vector of length 10). Then do: Yhat - cumsum(c(Y[N],Zhat))[-1] Xhat - exp(Yhat) Get error bounds on the forecasts is more problematic. cheers, Rolf Turner On 02/05/2013 11:49 PM

Re: [R] Exponentiate very large numbers

2013-02-05 Thread Rolf Turner
, minus infinity. cheers, Rolf Turner On 02/05/2013 04:59 AM, francesca casalino wrote: I am sorry I have confused you, the logs are all base e: ln(a) = 1347 ln(b) = 1351 And I am trying to solve this expression: exp( ln(a) ) - exp( ln(0.1) + ln(b) ) Thank you. 2013/2/4 francesca

Re: [R] how to multiply list of matrices by list of vectors

2013-02-05 Thread Rolf Turner
Try: n - length(mlist) result - lapply(1:n,function(i,m,v){m[[i]]%*%v[[i]]},m=mlist,v=vlist) These days the use of lapply is unlikely to be much, if at all, faster than the use of a for loop. cheers, Rolf Turner On 02/06/2013 06:50 PM, David Romano wrote: Hi everyone, I'd like

Re: [R] Predictions from the Segmented Package

2013-02-06 Thread Rolf Turner
. HTH cheers, Rolf Turner P. S. Does anyone know why or whither Vito Muggeo has disappeared? R. T. On 02/06/2013 11:30 AM, oli tills wrote: Hi, I would like to calculate the area under segmented regression lines (single breakpoints). I had thought that I could do

Re: [R] Adding Latex to text

2013-02-06 Thread Rolf Turner
Perhaps you want to look at ?plotmath cheers, Rolf Turner On 02/07/2013 11:41 AM, David Arnold wrote: Hi, I'd like to add alpha in latex code to my image. Any suggestions? library(UsingR) BagA = c(rep(10,6),rep(20,5), rep(30,4),rep(40,3),rep(50,2),60,70) BagA BagB = c(10

Re: [R] Spatstat - Kest, envelope problem

2013-02-07 Thread Rolf Turner
pattern object; too easily confused with the name of the function points(). cheers, Rolf Turner On 02/08/2013 02:57 AM, Pavel_K wrote: Hello, I am writing cause I have a problem when try to create confidence envelopes in spatstat. I have a point data representing firms in my study

<    5   6   7   8   9   10   11   12   13   14   >