i have trouble in using spatstat package.
i want to simulate a community under the Strauss process,which has a
parameter gamma that controls interaction strength between points,and Strauss
process is defined only for 0 ¡Ügamma ¡Ü 1 and is a model for inhibition
between points.
my pro
Esmail Bonakdarian-4 wrote:
>
> Hi,
>
> I am trying to use the optimize function to optimize a function. The
> results I am getting don't agree with what I compute on my own and
> when I look at the graph of
>
> f(x) = 100 + ((x-10)**2 + (x-10)) * cos(x-10), where -10 <= x <= 10
>
> in
On 2009-May-23 , at 20:16 , Jakson Alves de Aquino wrote:
Just a note: there is no need of before . Almost all key
bindings work in insert, normal and visual modes.
Well, without switching to the non-insert mode, I find that pressing
F9 prints the commands in the file instead of executing
Hello:
Have you looked at Pfaff (2008) Analysis of Integrated and
Cointegrated Time Series with R, 2nd ed. (Springer)?
I have not read this book, but the title and table of contents
sounds like it contains many alternative answers to your question, with
the "best" among those b
Ravi Varadhan wrote:
Look at nlminb() or optim(), in particular the option `method = "L-BFGS-B"' or the
function spg() in "BB" package.
With these you can optimize over any number of variables.
Ravi.
Hi Ravi,
Thanks for the leads, I'll take a look, though right now I have
run into problems
Hi,
I am trying to use the optimize function to optimize a function. The
results I am getting don't agree with what I compute on my own and
when I look at the graph of
f(x) = 100 + ((x-10)**2 + (x-10)) * cos(x-10), where -10 <= x <= 10
in gnuplot.
I suspect I am making a mistake in the usa
As pointed by JiHO the biggest disadvantage of using the plugin is that
R is running through a pipe and consequently it is less interactive.
Just a note: there is no need of before . Almost all key
bindings work in insert, normal and visual modes.
The last version of the plugin allows the user t
On 2009-May-23 , at 17:40 , Paul Heinrich Dietrich wrote:
I'm interested in easing my way into learning VIM by first using the
Cream
text editor, liking the idea that it will work on both my Linux and
Windows
computers. I've installed Cream on my Linux machine, but can't
figure out
how to
jim holtman:
> You might want to look at how to use 'lapply' to create lists. Here
> is one way of doing it:
>
> > # create test data
> > a_threshold <- b_threshold <- as.data.frame(matrix(sample(c(1:5,
> NA), 100, TRUE), 10))
> > classification <- c('a', 'b')
> > result <- lapply(classificatio
I'm interested in easing my way into learning VIM by first using the Cream
text editor, liking the idea that it will work on both my Linux and Windows
computers. I've installed Cream on my Linux machine, but can't figure out
how to make Cream talk to R? Does anybody know? I'm using Ubuntu if it
I am having trouble modifying the lmer code to make the change that William
Dunlap suggested, and I believe that this is because the environment is
locked.
I tried:
1. Revising the lmerFactorList function in a word processor and
copying/pasting into lmer, but this did not work because the env
Hello R-list,
I am preforming an lda on the following data.
Curvature Diameter Quality
1 2.95 6.63Passed
2 2.53 7.79Passed
3 3.57 5.65Passed
4 3.16 5.47Passed
5 2.58 4.46 NotPassed
6 2.16 6.22 NotPassed
7 3.27 3.52
On Fri, May 22, 2009 at 7:32 PM, wrote:
> Hi Kynn: this oddity is discussed in Patrick Burn's document called "The R
> Inferno". I don't recall the fix so I'm not sure if below is the same as
> what his book says to do but it seems to do what you want.
Wow, I sure hit the jackpot with this link
Here is one way of solving it:
> x <- c('0(a=1)' ,'0(b=1)' ,'0.133(b=1)' ,'0.555(a=1)'
,'>5.32(a=1)')
> # "(" and ")" have special meaning in regular expressions so they have to
be escaped
> (y <- as.numeric(gsub("\\(.*\\ )|>", "", x)))
[1] 0.000 0.000 0.133 0.555 5.320
> # find "a=1" to div
You might want to look at how to use 'lapply' to create lists. Here is one
way of doing it:
> # create test data
> a_threshold <- b_threshold <- as.data.frame(matrix(sample(c(1:5, NA), 100,
TRUE), 10))
> classification <- c('a', 'b')
> result <- lapply(classification, function(.cls){
+ colSum
Thanks for introducing me to "with" and the smart use of R subscripting
Now I know I can do something like this.
test<-c(1,1,1,1,1,0,0,0,0,0,2,2,2,2,2,2,0,1,0,1,1,0,0,0,0,0,0,0)
> with(rle(test), max(lengths[values==2]))
[1] 6
> with(rle(test), max(lengths[values==1]))
[1] 5
> with(rle(test), max(
!!
On Sat, May 23, 2009 at 1:52 PM, tsunhin wong wrote:
> Thanks!
> I tested it using:
> test<-c(1,1,1,1,1,0,0,0,0,0,0,0,1,1,0,1,0,1,0,1,1)
> that has a longer 7 zeros and 5 ones.
>
> What part of the script does the selection of ones instead of zeros?
>
> - John
>
> On Sat, May 23, 2009 at 1:17
Thanks!
I tested it using:
test<-c(1,1,1,1,1,0,0,0,0,0,0,0,1,1,0,1,0,1,0,1,1)
that has a longer 7 zeros and 5 ones.
What part of the script does the selection of ones instead of zeros?
- John
On Sat, May 23, 2009 at 1:17 PM, Gabor Grothendieck
wrote:
> Try this:
>
> with(rle(test), max(lengths[
Try this:
with(rle(test), max(lengths[!!values]))
On Sat, May 23, 2009 at 1:09 PM, tsunhin wong wrote:
> Dear R Users,
>
> I am trying to write a script to count the longest consecutive
> occurring 1 in a sequence:
> test<-c(1,1,1,1,1,1,1,0,0,0,0,1,1,0,1,0,1,0,1,1)
>
> In the case of the object
Dear R Users,
I am trying to write a script to count the longest consecutive
occurring 1 in a sequence:
test<-c(1,1,1,1,1,1,1,0,0,0,0,1,1,0,1,0,1,0,1,1)
In the case of the object "test", 1 occurs 7 consecutive times which
is the longest consecutive within the sequence.
I know I can always do a th
Try this:
D(expression(x*x), "x")
On Sat, May 23, 2009 at 12:46 PM, dimitris kapetanakis
wrote:
>
> Dear all,
>
> I want to save a value from an expression that I created by using the deriv
> function. So for example the output from an expression using the deriv
> command is:
>
> expression({
>
Dear all,
I want to save a value from an expression that I created by using the deriv
function. So for example the output from an expression using the deriv
command is:
expression({
.expr7 <- 4 * b.nox.2^2 - 12 * b.nox.3 * b.nox.1
.expr9 <- -2 * b.nox.2 - sqrt(.expr7)
.expr10 <- 6 *
Replying to myself again, I've now figured out how to build all the
help files, including 00Index.html, without actually building the
package. The point is to construct a complete list of all html help
files for searching.
The one thing I cannot figure out is how to build the index of all
package
Thanks, Michael. Just one more follow-up question. Is there other way
to get the "GdkDrawable" (here da2) without using <<- or other
assignment operation from within expose_fn? I thought
da$GetRootWindow() would work, but it does not.
da <- gtkDrawingArea()
da2 <- NULL
expose_fn <- function(widge
Dear R help-list,
I am trying to calculate Monmoniers algorithm. I have 3 data sets: coordinates
(coord), distance matrix (comdist) and geographical distance matrix (geodist).
I consistently get the error " dimnames does not match array extent". However,
when I use the function "structure" I ge
Hi R-list.
This is my first post. I'll try to be as precise as possible with the
difficulty I have to "get things done".
I have a hard time trying to construct a double "for" loop and create
within the inner loop new objects (in this case vectors).
I posted this question in a non-directly relate
Look at nlminb() or optim(), in particular the option `method = "L-BFGS-B"' or
the function spg() in "BB" package.
With these you can optimize over any number of variables.
Ravi.
Ravi Varadhan, Ph.D.
Assistant Professor,
Div
Estaré ausente de la oficina desde el 22/05/2009 y no volveré hasta el
04/06/2009.
Responderé a su mensaje cuando regrese.
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
Hello all,
I would like to maximize or minimize a given math function over a
specific set of values.
I was checking out Wolfram Alpha (http://www70.wolframalpha.com/)
and it can do simple optimization problems in math, such as
maximize 15*x - x**2 over 0 to 15
(http://www70.wolframalph
On Sat, 23 May 2009 12:44:19 + (GMT) Iain Gallagher
wrote:
IG> I am hoping for some help with a relatively simple problem. I have
IG> a data frame arranged as below. I want to be able to count the
IG> occurrence of each gene (eg let-7e) by Experiment. In other words
IG> how many times does a
Try this:
Lines <- "Tanaka Mitchell Wang Hunter Chen Chim
miR-191* let-7e let-7b miR-126let-7a let-7g
miR-198let-7f let-7c miR-146a let-7b let-7i
miR-22 let-7g miR-1224 miR-16 let-7d miR-130b
miR-223let-7i miR-124
On Fri, May 22, 2009 at 11:27 PM, Ronggui Huang wrote:
> Dear all,
>
> I use gtkImageFromFile to display an image. Then I want to do some
> gsignal to handle mouse event. I click the mouse and move a another
> position and release. I can get the position of the firs click and the
> release positio
Hello list.
I am hoping for some help with a relatively simple problem. I have a data frame
arranged as below. I want to be able to count the occurrence of each gene (eg
let-7e) by Experiment. In other words how many times does a given gene crop up
in the dataframe. I tried table but couldn't
Jean-Paul Kibambe Lubamba wrote
>
>I have two questions:
>
>I am computing a linear regression model with 0 as Intercept.
>
>Well, I would like the sum of my predicted values be equal to a constant
>and therefore analyze if my coefficients are significatively different
>using or not this constrain
you can find the R_CStackLimit in Rinterface.h
after that you will know how to use it!
ÔÚ2009-05-21?17:53:54£¬anon36??дµÀ£º
>
>Apparently?the?way?to?deal?with?this?error?message?is?to?set
>??R_CStackLimit?=?(uintptr_t)-1
>I?tried?typing?this?in?the?R?console,?but?it?says?Error:?object
>"R_CStac
Simply use the col paramater, with a factor to index the colors.
Example:
# generate some data
x <- rnom(100)
y <- rnorm(x)
z <- as.factor(rbinom(x,1,0.5))
# plot
plot(x,y, col=c('red','blue')[z])
HTH,
Matthieu
__
R-help@r-project.org mailing list
jjh21 wrote:
Another question related to bootcov():
A reviewer is concerned with the fact that bootstrapping the standard errors
does not give the same answers each time. What is a good way to address this
concern? Could I bootstrap, say, 100 times and report the mean standard
error of those 100
On Thu, 2009-05-21 at 20:47 -0700, Michael wrote:
> Hi all,
>
> Could anybody point me to an automatic model selection based on BIC
> for my MLE fitting problem, in R?
?stepAIC
>
> I would imagine I just have to supply the MLE LLF function, and the
> dimension of the problem and the number of o
Hi All,
I have two questions:
I am computing a linear regression model with 0 as Intercept.
Well, I would like the sum of my predicted values be equal to a constant
and therefore analyze if my coefficients are significatively different
using or not this constraint.
Does anyone know how I can co
Another question related to bootcov():
A reviewer is concerned with the fact that bootstrapping the standard errors
does not give the same answers each time. What is a good way to address this
concern? Could I bootstrap, say, 100 times and report the mean standard
error of those 100 estimates? I
On Thu, 2009-05-21 at 05:28 -0700, Pooka wrote:
> Hello,
>
> I am a very new user to R so please have patience with me. :clap:
>
> I am trying to evalute the "internal response" for a couple of different
> cluster methods with the help of the AdjustedRandIndex, which is included in
> the mclust
Dear Tim,
Have a look at the ggplot2 package.
library(ggplot2)
ggplot(your.data.frame, aes(x = EducationYears, y = Income, colour =
Registered)) + geom_point()
You find a lot of examples at the ggplot2 website:
http://had.co.nz/ggplot2/
HTH,
Thierry
-
42 matches
Mail list logo