Thank you for your suggestions. I found, after much experimentation,
that scale_fill_gradientn did indeed provide a good solution, as below.
library(ggplot2)
a <- c(rep(1,6),rep(2,6),rep(3,6),rep(4,6))
b <- c(0.1, 0.5,-0.3, 1.2,-0.4,-1.2,
0.7, 0.8,-1.2,-0.5,10.0, 0.3,
0.2,-0.4,-15.
gt; -Original Message-
> From: R-help On Behalf Of
> p...@philipsmith.ca
> Sent: Tuesday, March 9, 2021 5:06 AM
> To: r-help@r-project.org
> Subject: [R] Gradient plots in ggplot2
>
> I am having trouble with a gradient fill application in ggplot2, caused
> by outlier values. In m
Perhaps scale_fill_gradientn() would be useful.
On March 8, 2021 8:05:52 PM PST, p...@philipsmith.ca wrote:
>I am having trouble with a gradient fill application in ggplot2, caused
>
>by outlier values. In my reprex, most of the values are between 2 and
>-2, but there are two outliers, 10 and -15
I am having trouble with a gradient fill application in ggplot2, caused
by outlier values. In my reprex, most of the values are between 2 and
-2, but there are two outliers, 10 and -15. The outliers stand out well,
which is good, but all the other numbers show almost no colour
variation. I woul
Thank you so much. Both worked well. Thanks
On Sun, Feb 5, 2017 at 2:27 AM, Jeff Newmiller
wrote:
> You haven't indicated what information you want to convey with this
> gradient.
>
> You also are using arrays where you should be using vectors, usually
> stored in a data frame.
>
> Here is one w
You haven't indicated what information you want to convey with this gradient.
You also are using arrays where you should be using vectors, usually stored in
a data frame.
Here is one way using the contributed package ggplot2:
library(ggplot2)
DF <- data.frame( V1=1:10, V2=11:20, C=21:30 )
p <-
> On Feb 4, 2017, at 9:14 AM, Riyas MJ wrote:
>
> Hi all,
>
> I am a new user of R. I just did my first real program.
> I would like to know how to put a gradient (like rainbow() or topo.colors,
> etc) to a* line* graph.
>
> Example:
> ar1=array(data=1:10,dim=9)
> ar2=array(data=11:20,dim=9)
>
Hi all,
I am a new user of R. I just did my first real program.
I would like to know how to put a gradient (like rainbow() or topo.colors,
etc) to a* line* graph.
Example:
ar1=array(data=1:10,dim=9)
ar2=array(data=11:20,dim=9)
plot(ar1,ar2,type="l",col="red",lwd=3)
Instead of a red color, I woul
Come on man !
I have to make the algorithm CG-Steihaug it's not easy. And I need the
gradient of this function to make my algorithm works for functions f : R^2
-> R
(my algorithm already works for functions f : R -> R)
Please.
--
View this message in context:
http://r.789695.n4.nabble.com/gra
On 25.11.2012 15:21, izymaths wrote:
Hi,
I'm a french student and I need some help for my project.
I have to calcul the gradient of the function :
f <- function(x,y) {
(1 - x^2) + (y - x^2)^2
}
This list does not answer homework problems.
And even if we would, your problem is school level
Hi,
I'm a french student and I need some help for my project.
I have to calcul the gradient of the function :
f <- function(x,y) {
(1 - x^2) + (y - x^2)^2
}
Thanks ! :)
--
View this message in context:
http://r.789695.n4.nabble.com/gradient-tp4650734.html
Sent from the R help mailing list
On Mar 31, 2012, at 3:58 PM, mariam behboudi wrote:
Hello
In matlab we have " gradient(F,h) " where h is a scalar uses h
as the
spacing between points in each direction. Now I need to use this
function
in R. and I dont know how can I should define my function that I
haave "h"
in R?
Hi,
Have you looked at:
?grad
in the numDeriv package? It works very similarly and there are examples.
Hope this helps,
Josh
On Sat, Mar 31, 2012 at 12:58 PM, mariam behboudi
wrote:
> Hello
> In matlab we have " gradient(F,h) " where h is a scalar uses h as the
> spacing between points
Hello
In matlab we have " gradient(F,h) " where h is a scalar uses h as the
spacing between points in each direction. Now I need to use this function
in R. and I dont know how can I should define my function that I haave "h"
in R?
thanks
[[alternative HTML version deleted]]
ent Google Summer of
Code effort.
John Nash
On 08/30/2011 06:00 AM, r-help-requ...@r-project.org wrote:
> Message: 10
> Date: Mon, 29 Aug 2011 02:10:36 -0700 (PDT)
> From: Kathie
> To: r-help@r-project.org
> Subject: [R] gradient function in OPTIMX
> Message-ID: <131460903
nt problem in optimx.
Rubén H. Roa-Ureta, Ph. D.
AZTI Tecnalia, Txatxarramendi Ugartea z/g,
Sukarrieta, Bizkaia, SPAIN
-Original Message-
From: r-help-boun...@r-project.org on behalf of Kathie
Sent: Mon 8/29/2011 11:10 AM
To: r-help@r-project.org
Subject: [R] gradient function in OPTIMX
Dear
Hi Kathie,
The gradient check in "optimx" checks if the user specified gradient (at
starting parameters) is within roughly 1.e-05 * (1 + fval) of the numerically
computed gradient. It is likely that you have correctly coded up the gradient,
but still there can be significant differences b/w num
Dear R users
When I use OPTIM with BFGS, I've got a significant result without an error
message. However, when I use OPTIMX with BFGS( or spg), I've got the
following an error message.
> optim
On 07/06/2011 04:19 PM, Annemarie Verkerk wrote:
Dear R-help subscribers;
I have a question regarding making gradients in R. I've searched on the
web, but was only able to find functions that make a gradient between
color X and Y, which is not what I want.
I want to 'pick out' individual, small
Dear R-help subscribers;
I have a question regarding making gradients in R. I've searched on the
web, but was only able to find functions that make a gradient between
color X and Y, which is not what I want.
I want to 'pick out' individual, smaller pieces of a gradient based on a
range of nu
On Tue, 02-Mar-2010 at 02:43PM -0500, Liaw, Andy wrote:
|> In most implementations of boosting, and for that matter, single tree,
|> the first variable wins when there are ties. In randomForest the
That still doesn't explain why with gbm, two identical variables will
"share the glory" (approxima
On Tue, Mar 2, 2010 at 2:43 PM, Liaw, Andy wrote:
> In most implementations of boosting, and for that matter, single tree,
> the first variable wins when there are ties.
They must be in a union :-)
>> What happens if there's a third?
If they were P perfectly correlated predictors, the importanc
In most implementations of boosting, and for that matter, single tree,
the first variable wins when there are ties. In randomForest the
variables are sampled, and thus not tested in the same order from one
node to the next, thus the variables are more likely to "share the
glory".
Best,
Andy
Fro
On Mon, 01-Mar-2010 at 12:01PM -0500, Max Kuhn wrote:
|> In theory, the choice between two perfectly correlated predictors is
|> random. Therefore, the importance should be "diluted" by half.
|> However, this is implementation dependent.
|>
|> For example, run this:
|>
|> set.seed(1)
|> n <-
In theory, the choice between two perfectly correlated predictors is
random. Therefore, the importance should be "diluted" by half.
However, this is implementation dependent.
For example, run this:
set.seed(1)
n <- 100
p <- 10
data <- as.data.frame(matrix(rnorm(n*(p-1)), nrow = n))
dat
Dear R users,
Im trying to understand how correlated predictors impact the Relative
Importance measure in Stochastic Boosting Trees (J. Friedman). As Friedman
described
with single decision trees (referring to Briemans CART
algorithm), the relative importance measure is augmented by a strate
Following up on my previous post.
I've managed to have the function return a gList rather than plot everything
directly, but I get a rather obscure error message when I try to wrap the
grobs in a gTree with a rotated viewport,
Error in x$children[[i]] : attempt to select less than one element
ho
Dear list,
Following a recent enquiry, I've been playing with the idea of creating a
colour gradient for a polygon, using the Grid package. The idea is to draw a
number of stripes of different colours, using the grid.clip function. Below
is my current attempt at this,
library(grid)
rotate.polyg
Thank you. I saw the source. But I am not sure how to get from
.Internal(optim(...)) to fmingr.
Kevin
Katharine Mullen wrote:
> see the fmingr function in src/main/optim.c
> (https://svn.r-project.org/R/trunk/src/main/optim.c)
>
> On Wed, 25 Feb 2009 rkevinbur...@charter.net wrote:
>
>
see the fmingr function in src/main/optim.c
(https://svn.r-project.org/R/trunk/src/main/optim.c)
On Wed, 25 Feb 2009 rkevinbur...@charter.net wrote:
> I have read that when the gradient function is not supplied (is null)
> then first order differencing is used to find the differential. I was
> tr
I have read that when the gradient function is not supplied (is null) then
first order differencing is used to find the differential. I was trying to
track down this for my own information but I run into .Internal(optim.). I
was not sure where to look next to see the function that is automat
Dear R-user:
Could you please tell me how to extract gradient and Hessian from the following
example model of lmer2 package?
(fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy))
I would really appreciate your kind help.
Best,
Sattar
32 matches
Mail list logo