Displaying 20 results from an estimated 2000 matches similar to: "Vectorization of duration of the game in the gambler ruin's problem"
2012 Nov 16
3
dovecot: lda(root): Fatal: Invalid user settings. Refer to server log for more information.
I ran dovecot -a and the blizzard of data seemed ok to my limited
knowledge. Is there another log I should look into to trace this error
down?
Dovecot and system info:
thufir at dur:~$
thufir at dur:~$ dovecot --version
2.0.19
thufir at dur:~$
thufir at dur:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.1
2012 Nov 06
4
Plot in function
Hello,
I am a R beginner and I have a question about a litte function I found.
Here is the code:
# Gambler's Ruin Problem.
# seed capital: k
# rounds: n
# probability of success: p
# number of trials: N
# graphical output (yes/no): draw
# Wait for new graphic (yes/no): ask
ruin<- function( N = 1, n = 10, k = 1, p = 1 /
2006 Apr 26
1
help using tapply
Dear R-mates,
# Here's what I am trying to do. I have a dataset like this:
id = c(rep(1,8), rep(2,8))
dur1 <- c( 17,18,19,18,24,19,24,24 )
est1 <- c( rep(1,5), rep(2,3) )
dur2 <- c(1,1,3,4,8,12,13,14)
est2 <- rep(1,8)
mydata = data.frame(id,
estat=c(est1, est2),
durat=c(dur1, dur2))
# I want to one have this:
id = c(rep(1,8), rep(2,8))
2007 Dec 28
1
logistic mixed effects models with lmer
I have a question about some strange results I get when using lmer to
build a logistic mixed effects model. I have a data set of about 30k
points, and I'm trying to do backwards selection to reduce the number
of fixed effects in my model. I've got 3 crossed random effects and
about 20 or so fixed effects. At a certain point, I get a model (m17)
where the fixed effects are like this
2013 Dec 24
1
dovecot-postfix stack imap_client_workarounds
To use dovecot-postfix stack with thunderbird, do I put the
configuration into /usr/share/dovecot/protocols.d/impad.protocol? That
would seem to be how the stack is configured.
"Thunderbird
To use with Thunderbird, edit the file /etc/dovecot/dovecot.conf:
protocol imap {
...
login_greeting_capability = yes
imap_client_workarounds = tb-extra-mailbox-sep
}"
2008 Aug 27
5
Integrate a 1-variable function with 1 parameter (Jose L. Romero)
Hey fellas:
I would like to integrate the following function:
integrand <- function (x,t) {
exp(-2*t)*(2*t)^x/(10*factorial(x))
}
with respect to the t variable, from 0 to 10.
The variable x here works as a parameter: I would like to integrate the said function for each value of x in 0,1,..,44.
I have tried Vectorize to no avail.
Thanks in advance,
jose romero
2007 May 07
1
TukeyHSD fails on my data
Howdo folks,
So I have my data (attached). There are two columns I'm interested in;
"algname" and "dur". I'd like to know how dur changes with algname.
algname is nominal and there are 7 possibilities. There are two more
nominal independents, "task" and "id", so my model is:
dur ~ algname+task+id
From the research I've done, a TukeyHSD
2010 Jan 26
5
Strange tick in ggplot geom_area; and ordering, again
In the area plots below, I see 4 triangle ticks at both sides of the bar; I
believe these are non-stacked values for p, but they are definitively
confusing.
In addition, I would like to get the order of the colors in the plot the
same as in the legend, and not arranged alphabetically (the factor is
ordered, don't touch my order). Hadley once mentioned an undocumented
aestetics
2009 Dec 08
6
conditionally merging adjacent rows in a data frame
Hi, I have a data frame and want to merge adjacent rows if some condition is
met. There's an obvious solution using a loop but it is prohibitively slow
because my data frame is large. Is there an efficient canonical solution for
that?
> head(d)
rt dur tid mood roi x
55 5523 200 4 subj 9 5
56 5523 52 4 subj 7 31
57 5523 209 4 subj 4 9
58 5523 188 4 subj 4 7
2011 Apr 25
1
Trouble Passing a for loop variable (iteration #) to a data frame
Greetings -
I am working on a piece of code to simulate vehicle times in and out in each
of a number of parking spaces. At this stage, my code basically does what
it is supposed to do but for the sequential number of each new parking event
for a given space (i.e., the index of the loop variable). Instead of
passing the index of the loop variable (iter) to the data frame, it passes
the value
2009 Nov 25
2
order of panels in xyplots
I'd like do a simple xyplot with customized order of panels and try to
understand how to use index.cond for that. Several attempts didn't
deliver the correct results. Now, I noticed the following:
> p <- xyplot(dur~roi|trial, data)
> p$index.cond
[[1]]
[1] 1 2 3 4 5 6 7 8 9 10
These numbers are "valid indexing vector for the integer vector
2010 Jun 20
2
mean duration (persistence) of daily data
Dear R users
A quite simple question:?how can I get the mean duration (persistence)
of daily data, when the data set looks as follows:?
[1] 7 7 7 9 9 5 7 5 5 5 9 5 5 6 6 6 1 1 1 2 2 4 4 4 4 7 7 3 3 2 4 4 7 7 7 7 7
[38] 7 7 5 5 9 9 5 5 5 1 7 9 9 9 9 9 5 5 5 5 5 3 4 4 4 4 4 4 4 4 2 2 2 2 2 2 8
[75] 8 6 6 6 8 8 8 8 8 6 6 2 8 8 8 8 8 8 8 8 8 2 2 2 2 2 6 6 6 6 6 6 6 6 6 6 3
[112] 3 2 2 2 1 5 1 1 4
2010 Nov 19
4
calculating martingale residual on new data using "predict.coxph"
Hi list,
I was trying to use "predict.coxph" to calculate martingale residuals on a test
data, however, as pointed out before
http://tolstoy.newcastle.edu.au/R/e4/help/08/06/13508.html
predict(mycox1, newdata, type="expected") is not implemented yet. Dieter
suggested to use 'cph' and 'predict.Design', but from my reading so far, I'm not
sure they can
2008 Jun 19
2
Capturing draggable revert
I''ve seen a few posts about this, but no answers.
I would like to be able to call a function when a draggable revert
occurs. What I''m trying to do is replace a photo with an icon on drag
(which I''ve accomplished), but I need to swap it back if the revert
fires.
I really, really wish there were an onRevert() option, but there
isn''t, so I guess I''ll
2017 May 19
2
noinline changes between 3.8 and 4.0?
All,
I'm in the process of upgrading an LLVM client from using 3.8 to using 4.0
and am running into the following issue:
// compile with:
// clang++ -std=c++11 -Wno-c++14-extensions -S -emit-llvm
// ~/chrono.cpp -o chrono.ll
#include <chrono>
#include <ratio>
#include <thread>
using namespace std;
using namespace std::chrono;
using tick = ratio<1, 300>;
using
2011 Feb 06
3
manipulate dataframe
Hello,
Can someone give me hint to change a data.frame.
I want to split a column in more columns depending on the value of a other
column.
Thanks for the reaction,
Andre
Example:
> dat
x1 x2
1 1 a
2 1 b
3 1 c
4 2 d
5 2 e
6 2 f
7 3 g
8 3 h
9 3 i
in
> dur
d1 d2 d3
1 a d g
2 b e h
3 c f i
[[alternative HTML version deleted]]
2009 Jul 07
2
rle
Hallo,
I have an other problem, I have this vector signData with an alternation of
1 and -1 that corrispond to the duration of two different percepts. I
extracted the durations like this:
signData<- scan("dataTR10.txt")
dur<-rle(signData)$length
Now I would like to extract only the positive duration, e.g.
signData <- c(1,1,1,1,-1,-1,-1,1,1,-1,-1)
posduration <- c(4,2)
I
2011 Nov 01
2
Removal/selecting specific rows in a dataframe conditional on 2 columns
Dear list,
After reading different mails, blogs, and tried a few different codes without any success, I am asking your help!
I have the following data frame where each row represent a survey unit with the following variables:
> names(RV09)
[1] "record.t" "trip" "set" "month" "stratum" "NAFO"
[7]
2005 Jul 18
2
Rails installation problem
Hi there,
I''m a new to Rails and to Ruby too. I hope you can help with what
hopefully is a simple installation problem.
I have successfully installed version:
C:\>ruby -v
ruby 1.8.2 (2004-12-25) [i386-mswin32]
I have successfully installed gem:
C:\>gem --version
0.8.11
When I try to install Rails i get the following error:
C:\>gem install rails --include-dependencies
2010 Jun 01
2
Help on aggregate method
Dear R experts,
I would really appreciate if you had an idea on how to use more
efficiently the aggregate method:
More specifically, I would like to calculate the mean of certain
values on a data frame,? grouped by various attributes, and then
create a new column in the data frame that will have the corresponding
mean for every row. I attach part of my code:
matchMean <-