Hello,
Richard's answer solves the problem, I'm writing about details in the
OP's post.
Ana, your code example is missing some library() calls:
library(ggplot2)
library(ggrepel)
library(ggthemes)
library(dplyr)
# and where to find the data set
data(murders, package = "dslabs")
As for the d
Dear Jim,
Thank you for looking into this.
Sorry, there was actually no overlap in the small part of the data I
reported. My error of omission.
So when I run my full data with the adjustment you made, I got some thing
that was far from what I was expecting. That tell me that I need to send
the com
It is just like the message suggested. You have a + at the end of each line
and
the beginning of the next. The one at the end is required. The ones at
the beginning are
causing the error message.
Please put spaces around your assignment arrows.
Difficult to read: r<-murders
Easy to read:r <
Hello,
I got this error:
Error: Cannot use `+.gg()` with a single argument. Did you
accidentally put + on a new line?
After running this:
data(murders)
library(ggplot2)
library(dplyr)
library(ggplot2)
ggplot(data=murders)
#define the slope of the line
r<-murders %>% summarize(rate=sum(total)/sum
Hi Ogbos,
I don't think that your example allows us to work out what you are
trying to do. For one thing, "x1" and "x2" do not overlap. Also, you
are plotting the frequencies of dates of observations, which may not
be what you want.
The following code will correctly display your example:
hist(x1,b
These results reflect my experience with this sort of problem.
A couple of comments:
1) optimx package has a multistart wrapper. I probably should have written one
for
nlsr. Maybe Bernard and I should work on that. The issues are largely to make
things
resistant to silly inputs, which even the
John/Petr, I think there is an issue between a global optimum and local optima.
I added a multistart loop around the code to see if I could find different
solutions. Here is the code I added (I am not a great coder so please excuse
any inefficiencies in this code segment):
# Multistart approach
Hello,
That's just
mean(my.data)
Note that
summary(t(my.data))
also gives the mean. (You need to transpose because the way you ran
replicate outputs a 1x100 matrix.)
Hope this helps,
Rui Barradas
Às 21:17 de 07/05/20, varin sacha via R-help escreveu:
Dear R-experts,
My goal is to get
Hi Subhamitra,
For some reason, your data didn't make it through. Maybe you tried to
send an .xls or .xlsx file. If so, export it as CSV or if it's not too
big, just paste the text into your email.
Jim
On Thu, May 7, 2020 at 10:30 PM Subhamitra Patra
wrote:
>
> Dear R-users,
>
> I want to estima
Dear Experts,
Greetings.
I am trying to display two datasets in a histogram. I have been able to
plot the graph and added the legend for the two colors. I am, however,
having difficulties adding a legend to represent the regions of overlap
(the third legend). Below are my data and code.
Thank yo
Dear R-experts,
My goal is to get only 1 value : the average/ the mean of the 100 MSE values.
How can I finish my R code ?
###
my.experiment <- function() {
n<-500
x<-runif(n, 0, 5)
z <- rnorm(n, 2, 3)
a <- runif(n, 0, 5)
y_mode
Hello,
You cannot pass a vector of colors to col.axis, you need to plot the
axis twice, once the normal axis, like in your code, then overplot just
those last 2 labels.
xlabels <- seq(trunc(as.POSIXct(first_day, format="%Y-%m-%d-%H-%M"),
"days"), trunc(as.POSIXct(last_day, format="%Y-%m-%d-
Partial matching is a feature regretted by its designer, but is not really
possible to remove at this point. One early change in R relative to S was to
require full match of anything after "...", but as you have noticed, that does
not apply for interval=
So, "don't do that, then"
-pd
> On 7
As John said, sums of exponentials are hard. One thing that often helps
a lot is to use the partially linear structure: given a and b, you've
got a linear model to compute A and B. Now that you're down to two
nonlinear parameters, you can draw a contour plot of nearby values to
see how much
Dear R users,
in a plot I need to change the colours of some of the labels of the x-axis.
In the example below reported, I would like to have the labels of the last and
second-last date in red.
I tried to find the solution searching the web, but I could not understand the
hints and I was not sure
Dear Søren,
I suspect that the good R souls wouldn't consider this a bug, but a
logical consequence of the R language design. It is of course a valid
question whether this should be explicitly mentioned in documentation.
If I recall correctly about function evaluation: First all named
arguments a
Dear all,
I am wondering if there is a minor bug in the optimimize function; please see
below:
---
> ## example taken from optimize documentation
> f <- function (x, a) (x - a)^2
> xmin <- optimize(f, c(0, 1), tol = 0.0001, a = 1/3)
> xmin
$minimum
[1] 0.333
$objective
[1] 0
> ## if we
The double exponential is well-known as a disaster to fit. Lanczos in his
1956 book Applied Analysis, p. 276 gives a good example which is worked through.
I've included it with scripts using nlxb in my 2014 book on Nonlinear Parameter
Optimization Using R Tools (Wiley). The scripts were on Wiley's
Dear all
I started to use nlxb instead of nls to get rid of singular gradient error.
I try to fit double exponential function to my data, but results I obtain
are strongly dependent on starting values.
tsmes ~ A*exp(a*plast) + B* exp(b*plast)
Changing b from 0.1 to 0.01 gives me completely diff
Dear R-users,
I want to estimate ARCH test for multiple columns (i.e., from 2:21 COLUMNS
) in my data. For this purpose, I want to run a loop to calculate ARCH test
results for each column in the data frame. I tried by using for loop and
lapply function, but unable to write a loop for computing t
On 07.05.2020 at 13:12 Deepayan Sarkar wrote:
On Thu, May 7, 2020 at 4:16 PM Thomas Petzoldt wrote:
On 07.05.2020 at 11:19 Deepayan Sarkar wrote:
On Thu, May 7, 2020 at 12:58 AM Thomas Petzoldt wrote:
Sorry if I'm joining a little bit late.
I've put some related links and scripts together a
On Thu, May 7, 2020 at 4:16 PM Thomas Petzoldt wrote:
>
> On 07.05.2020 at 11:19 Deepayan Sarkar wrote:
> > On Thu, May 7, 2020 at 12:58 AM Thomas Petzoldt wrote:
> >>
> >> Sorry if I'm joining a little bit late.
> >>
> >> I've put some related links and scripts together a few weeks ago. Then I
>
On 07.05.2020 at 11:19 Deepayan Sarkar wrote:
On Thu, May 7, 2020 at 12:58 AM Thomas Petzoldt wrote:
Sorry if I'm joining a little bit late.
I've put some related links and scripts together a few weeks ago. Then I
stopped with this, because there is so much.
The data format employed by John
On Thu, May 7, 2020 at 12:58 AM Thomas Petzoldt wrote:
>
> Sorry if I'm joining a little bit late.
>
> I've put some related links and scripts together a few weeks ago. Then I
> stopped with this, because there is so much.
>
> The data format employed by John Hopkins CSSE was sort of a big surpris
You could deploy a rocker image, possibly with an API (built with plumber). But
I think it is misleading to refer to that as an executable.
On May 6, 2020 11:39:09 PM PDT, Paul Bernal wrote:
>Dear Jeff, an executable in terms of deploying a machine learning
>model,
>whether it a classifocation,
25 matches
Mail list logo