Re: [R] Bug in raster projectRaster?

2015-06-01 Thread Pascal Oettli
Wrong list. This should have been posted here: r-sig-...@r-project.org Regards, Pascal On Tue, Jun 2, 2015 at 7:56 AM, Mauricio Romero wrote: > Hi, > > I'm sorry I cant post a reproducible example, but the data sets involve are > too large. I'm currently trying to create a mosaic from 2 differen

[R] nls and four parameter estimates

2015-06-01 Thread Onoriode.Coast
Hello all! I am trying to estimate four parameters (mu, sigma, theta and lambda) of a model Using the nls package in R, I can only get it to work if I limit the number of parameters to be estimated to three (i.e. mu, sigma and theta) as in the first model - mod1 - below. Including a fourth param

[R] Bug in raster projectRaster?

2015-06-01 Thread Mauricio Romero
Hi, I'm sorry I cant post a reproducible example, but the data sets involve are too large. I'm currently trying to create a mosaic from 2 different Landsat 7 scenes. One of them is in UTM 18 and the other in UTM 17. Before using the mosaic command, I'm doing LandsatTransform=projectRaster(from=La

Re: [R] How to make new predictions from a GAM with a spline forced through the origin

2015-06-01 Thread Simon Wood
Hi Gavan, After running the code in your message, do something like this... xp <- c(.2,.3) ## x values for prediction Xp <- PredictMat(sm,data.frame(x=xp))[,-3] ## prediction matrix yp <- predict(b,list(X=Xp,off=rep(.6,2))) ## call predict.gam points(xp,yp,col=2) ## plot points ... hope that's

Re: [R] combine trellis lattice contour plot with simple plot() points() and text() commands?

2015-06-01 Thread Duncan Mackay
Hi Ivo If you want to add lines, text etc you can do that by a lattice panel function included in it would be panel.contour something like (untested) contourplot(... panel = function(x,y, etc,...){ panel.countorplot(x,y

Re: [R] combine trellis lattice contour plot with simple plot() points() and text() commands?

2015-06-01 Thread Jim Lemon
Hi Ivo, Not in a sane way. Have a look at the latticeExtra package that allows most of these things to be done. Jim On Tue, Jun 2, 2015 at 7:03 AM, ivo welch wrote: > can I add ordinary graphics commands to a contourplot? my naive > attempts are telling me that plot.new() has not yet been call

Re: [R] combine trellis lattice contour plot with simple plot() points() and text() commands?

2015-06-01 Thread David Winsemius
On Jun 1, 2015, at 2:03 PM, ivo welch wrote: > can I add ordinary graphics commands to a contourplot? my naive > attempts are telling me that plot.new() has not yet been called when I > try to add text(1,1,"hi") or points( c(0,1), c(1,0) )? There are lattice equivalents to many of the base prim

Re: [R] merge function

2015-06-01 Thread John Kane
Exactly what I thought too the first time I read ?merge. R sometimes has its own approach. John Kane Kingston ON Canada > -Original Message- > From: r-help@r-project.org > Sent: Mon, 1 Jun 2015 14:47:07 + (UTC) > To: li...@dewey.myzen.co.uk, r-help@r-project.org > Subject: Re: [R] m

Re: [R] lattice contourplots

2015-06-01 Thread Jeff Newmiller
Sorry, my first response was too hasty. Per the help file you need to use some kind of interpolation method to resample whatever random data points you have in a regular grid before you give it to contourplot. --- Jeff Newmil

[R] combine trellis lattice contour plot with simple plot() points() and text() commands?

2015-06-01 Thread ivo welch
can I add ordinary graphics commands to a contourplot? my naive attempts are telling me that plot.new() has not yet been called when I try to add text(1,1,"hi") or points( c(0,1), c(1,0) )? [or do I need to rewrite another contourplot with the old graphics system. the basics are probably looking

[R] Imposing linear binding constraint while using Rcgmin

2015-06-01 Thread Rajarshi Bhadra
Is there any way by which I can impose a linear binding constraint while using Rcgmin for a non linear optimization exercise? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.

Re: [R] merge function

2015-06-01 Thread Bert Gunter
You do not appear to understand what merge() does. Go through the worked examples in ?merge so that you do. FWIW, I would agree that the Help file is cryptic and difficult to understand. Perhaps going through a tutorial on database "join" operations might help. Cheers, Bert Bert Gunter "Data is

Re: [R] lattice contourplots

2015-06-01 Thread David Winsemius
On Jun 1, 2015, at 5:39 AM, ivo welch wrote: > thank you. yes, I got bitten by "FAQ 7.22: Why do lattice/trellis > graphics not work?" It had never occurred to me that this could be > expected behavior or a FAQ. (didn't show up in a google search for > contourplot.) Unless one knows, this is

Re: [R] alternatives to KS test applicable to K-samples

2015-06-01 Thread Cade, Brian
Not sure what the issue is here. If I click on the link I provided, I go right to the USGS page where instructions for downloading the software are provided. Brian Brian S. Cade, PhD U. S. Geological Survey Fort Collins Science Center 2150 Centre Ave., Bldg. C Fort Collins, CO 80526-8818 emai

Re: [R] Colour gradient is not working.

2015-06-01 Thread MacQueen, Don
Try this plot(1:33292, 1:33292,col=Color(33292)) and then decide again whether or not it is working. -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 6/1/15, 4:12 AM, "sreenath" wrote: >I have a table of 33291 rows.

Re: [R] Colour gradient is not working.

2015-06-01 Thread Boris Steipe
1. Don't use Nabble for the r-help mailing list. 2. Read the posting guide, and read http://adv-r.had.co.nz/Reproducibility.html 3. The following code works for me. Your error is not due to requesting too many colours... n <- 10 x <- rnorm(n) y <- rnorm(n) myPalette <- colorRampPalette(c("r

Re: [R] merge function

2015-06-01 Thread carol white via R-help
I understood that by would take the intersection of names(x) and names(y), names(x) being the column names of x and names(y), column names of y. if x has 5 col and the col names of x are col1, col2... col5 and y has 3 col and their names are col1, col2, col3, I thought that the merged data set wi

Re: [R] Colour gradient is not working.

2015-06-01 Thread David L Carlson
Your example is not reproducible. You pass 33292 colors to plot, but never specify how to use them so only the first color (red) is used. If it worked with a smaller number of colors, you were using something other than the default plot function. If it works with a smaller number of colors, but

Re: [R] merge function

2015-06-01 Thread Michael Dewey
On 01/06/2015 14:46, carol white via R-help wrote: Hi,By default the merge function should take the intersection of column names (if this is understood from by = intersect(names(x), names(y)), Dear Carol The by parameter specifies which columns are used to merge by. Did you understand it t

Re: [R] merge function

2015-06-01 Thread John Kane
Let me try this again. Here are the links I forgot. My apologies. http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example and http://adv-r.had.co.nz/Reproducibility.html John Kane Kingston ON Canada > -Original Message- > From: jrkrid...@inbox.com > Sent: M

Re: [R] merge function

2015-06-01 Thread John Kane
As Burt says it is not exactly clear what you want but is something like this what you are looking for? dat1 <- data.frame(aa = c("a", "b", "c"), bb = 1:3) dat2 <- data.frame(xx = c("b", "c", "d"), yy = 3:1) merge(dat1, dat2, by.x = "aa", by.y = "xx") For further reference here are some sugg

Re: [R] merge function

2015-06-01 Thread Bert Gunter
1. Please read and follow the posting guide. 2. Reproducible example? (... at least I don't understand what you mean) 3. Plain text, not HTML. Cheers, Bert Bert Gunter "Data is not information. Information is not knowledge. And knowledge is certainly not wisdom." -- Clifford Stoll On Mon,

[R] Colour gradient is not working.

2015-06-01 Thread sreenath
I have a table of 33291 rows. When i try to plot the graph with gradient colour using "colorRampPalette" command but the out put graph is colourless or in black colour.But when i try the same command with small values it is working why it so? Color <- colorRampPalette(c("red","blue")) plot(x,y,co

[R] merge function

2015-06-01 Thread carol white via R-help
Hi,By default the merge function should take the intersection of column names (if this is understood from by = intersect(names(x), names(y)), but it takes all columns. How to specify the intersection of column names?  Thanks Carol [[alternative HTML version deleted]] ___

Re: [R] lattice contourplots

2015-06-01 Thread ivo welch
thank you. yes, I got bitten by "FAQ 7.22: Why do lattice/trellis graphics not work?" It had never occurred to me that this could be expected behavior or a FAQ. (didn't show up in a google search for contourplot.) Unless one knows, this is a puzzler. Thanks for the pointer. so, a minimum work

Re: [R] lattice contourplots

2015-06-01 Thread Jeff Newmiller
The help for for contourplot answers this question in the description of the formula (x) argument. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go.

Re: [R] lattice contourplots

2015-06-01 Thread Jeff Newmiller
What does quartz() have to do with this? If quartz is the problem, R-sig-mac would be a better place to ask. Or are you being bitten by R FAQ 7.22? --- Jeff NewmillerThe . . Go Live..

[R] lattice contourplots

2015-06-01 Thread ivo welch
Dear R (3.2.0, osx) experts: I would like to create contourplots from irregular data frames (i.e., not a matrix on a grid).I am getting inconsistent results from lattice contourplot(). sometimes it works (quartz plot on contours), sometimes it doesn't (blank plot = nada). I have tried variati