Awesome, thanks!
On Wed, Oct 28, 2020 at 7:00 AM Deepayan Sarkar
wrote:
>
> On Tue, Oct 27, 2020 at 6:04 PM Luigi Marongiu
> wrote:
> >
> > Hello,
> > I am using e1071 to run support vector machine. I would like to plot
> > the data with lattice and specifically show the hyperplanes created by
On Tue, Oct 27, 2020 at 6:04 PM Luigi Marongiu wrote:
>
> Hello,
> I am using e1071 to run support vector machine. I would like to plot
> the data with lattice and specifically show the hyperplanes created by
> the system.
> I can store the hyperplane as a contour in an object, and I can plot
> on
Hi: I think you're writing over the plots so only the last one exists.
Maybe try P = P + whatever but
I'm not sure if that's allowed with plots.
On Tue, Oct 27, 2020 at 8:34 AM Luigi Marongiu
wrote:
> Hello,
> I am using e1071 to run support vector machine. I would like to plot
> the data with
You seem to have a problem with your Mindreader skills today, David!
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
I would be easier to respond if we had some idea what
Mindreader_2012_vars is, data.frame, list, matrix?
Give us a small, reproducible version of what you are trying to
accomplish.
-
David L Carlson
Department of Anthropology
Texas A&M University
College Stati
Hi there,
I'm adding a very small bit of something utterly useless to Michael's
response. When you start wondering why your code doesn't work the way
you expect, making it as simple as possible might be the first step.
For example, the following piece of code ...
TRUE
... is simpler than ...
!!
In what way doesn't this work?
You declare xx with one element and it prints.
Then on the next loop, you add another element, and it prints them both.
Then on the next loop, you add another element, and it prints all three.
And so on...
If you look at the output, you can see that it's a growin
elp@r-project.org
Subject: Re: [R] R for loop stops after 4 iterations
There's a seeming inconsistency in this question -- namely, you provide an
example of a data frame with 4 columns but say it is 27x3
-- but I think your question comes from a misunderstanding of what
length(e) calculates.
Hi:
Here are a couple of ways, using the data snippet you provided as the
input data frame e.
Start by defining the function, which outputs a percentage:
f <- function(n, mean, sd) {
s <- rnorm(n, mean = mean, s = sd)
round(100 * sum(s > 0.42)/length(s), 4)
}
(1) Use the plyr packag
On 11-10-22 7:33 PM, Philip Robinson wrote:
I have a data frame called e, dim is 27,3, the first 5 lines look like this:
V1 V2 V3V4
1 1673 0.36 0.08 Smith
2 167 0.36 0.08 Allen
399 0.37 0.06 Allen
4 116 0.38 0.07 Allen
595 0.41 0.08 Allen
Oops!!
Meant pnorm(, lower.tail = FALSE) -- don't do qnorm or bad things will happen.
Sorry,
Michael
On Sat, Oct 22, 2011 at 8:28 PM, R. Michael Weylandt
wrote:
> There's a seeming inconsistency in this question -- namely, you
> provide an example of a data frame with 4 columns but say it is
There's a seeming inconsistency in this question -- namely, you
provide an example of a data frame with 4 columns but say it is 27x3
-- but I think your question comes from a misunderstanding of what
length(e) calculates. For a data frame it gives the number of columns
back. Hence if you have a 27
Consider using a 'list' instead of creating a lot of objects that you then
have to manage:
x <- lapply(1:length(stats$hour), function(.indx) dataset[.indx, 3:15])
You can then access the data as x[[1]], ...
On Tue, May 20, 2008 at 12:58 PM, Douglas M. Hultstrand <
[EMAIL PROTECTED]> wrote:
> He
Take a look at ?assign
Juan Manuel Barreneche wrote:
I had to do the same thing many times, i usually use a combination of the
functions "eval", "parse" and "sprinf", as below:
k <- 1
for (i in 1:length(stats$hour)) {
eval(parse(text=sprintf("x%s <- dataset[%s,(3:15)]", i, k)))
k <- k+1
I had to do the same thing many times, i usually use a combination of the
functions "eval", "parse" and "sprinf", as below:
k <- 1
for (i in 1:length(stats$hour)) {
eval(parse(text=sprintf("x%s <- dataset[%s,(3:15)]", i, k)))
k <- k+1
}
what it does is:
eval(parse(text=STRING)) is a way to
Douglas -
To answer your question directly, use perhaps combination of ?assign and
?paste.
In general, you usually do not have to do this sort of thing, but can
use one of the apply family of functions (apply, sapply, lapply, mapply)
to do whatever you want with shorter, cleaner code and few
16 matches
Mail list logo