Hi Jeff,
If I understand correctly, the overhead of a loop is that at each iteration the
command must be interpreted, and this time is independent of the number of rows
N. So if N is small this overhead may be very significant but when N is large
this should be very small compared to the time n
Looks like you want to solve pbinom(k-1, N, p) = 0.5 for p. That is easy:
use uniroot.
testit <- function(k, N)
{
fn <- function(p, k, N) pbinom(k-1, N, p) - 0.5
uniroot(fn, c(0,1), k=k, N=N)
}
testit(6, 10)
On Sun, 17 Aug 2008, [EMAIL PROTECTED] wrote:
I would like to solve the equa
One way to port these kinds of models between applications is the
Predictive Model Markup Language (PMML). The R package 'PMML' supports
linear regression, rpart, SVM, and others, not adaBoost. On the other
side, not even the Python machine learning library Orange does have
an import function fo
You were probably referring to
https://stat.ethz.ch/pipermail/r-help/2008-April/160078.html
but a reference to ?windows would have sufficed.
On Mon, 18 Aug 2008, Duncan Mackay wrote:
At 14:53 18/08/2008, you wrote:
Hello,
I am trying to convert the following command from SPLUS to R:
grap
On Mon, 18 Aug 2008, Katharine Mullen wrote:
The following code is inspired by the help file for the relist()
function (see?relist), which explicitly details how you can use a
The example is in the 'Details' section and, indeed, it looks like it no
longer works.
I don't think it ever did (a
At 14:53 18/08/2008, you wrote:
Hello,
I am trying to convert the following command from SPLUS to R:
graphsheet(pages = TRUE)
Does anyone have an idea what is the equivalent in R?
Thanks
--
View this message in context:
http://www.nabble.com/graphsheet-tp19026010p19026010.html
Sent from
I would like to solve the equation is is the sum from k = i to N of
choose(N,k) * MR ^ k * (1 - MR) ^ (N - k) - 0.50 = 0
I want to solve for MR. This seems like a non-linear equation to me. But I am
having a hard time writing the function that implements the above. I could use
'for(...) as a br
Hello,
I am trying to convert the following command from SPLUS to R:
graphsheet(pages = TRUE)
Does anyone have an idea what is the equivalent in R?
Thanks
--
View this message in context:
http://www.nabble.com/graphsheet-tp19026010p19026010.html
Sent from the R help mailing list archive at
On Sun, 17 Aug 2008, Jeff Laake wrote:
I spent a lot of time searching and came up empty handed on the following
query. Is there an equivalent to rowSums that does product or cumulative
product and avoids use of apply or looping? I found a rowProd in a package
but it was a convenience function
I spent a lot of time searching and came up empty handed on the
following query. Is there an equivalent to rowSums that does product or
cumulative product and avoids use of apply or looping? I found a rowProd
in a package but it was a convenience function for apply. As part of a
likelihood calc
There was a thread on this recently. Solutions were posted to allow you
to join interpolated points to ``real'' ones using a different line
type.
See
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/127669.html
cheers,
Rolf Turner
On 18/08/2008, at 2:10 PM, jim holt
You can also do:
plot(approx(d[,1], d[,2], xout=d[,1]), type='b')
This will interprete the values between the missing values, but it is
probably best to leave it as you first had it with the missing lines
so that you know there is something different in the data.
On Sun, Aug 17, 2008 at 6:55 PM,
I don't know if it's the best way but you can do
d<-d[complete.cases(d),]
plot(d, type="b")
plot doesn't connect the points when there are NAs between them.
On Sun, Aug 17, 2008 at 9:55 PM, stephen sefick wrote:
d <- structure(c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 1,
2, 3, 4, 5
You have to get rid of the NAs since they indicate that there are no
values and will not draw a line:
> c.d <- d[complete.cases(d),]
> plot(c.d, type='b')
>
On Sun, Aug 17, 2008 at 6:55 PM, stephen sefick <[EMAIL PROTECTED]> wrote:
> d <- structure(c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
d <- structure(c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 1,
2, 3, 4, 5, 6, 7, 8, 9, 10, NA, NA, NA, 14), .Dim = c(14L, 2L
), .Dimnames = list(NULL, c("a", "b")))
plot(d, type="b")
This is simplified, but Is there an option I am missing that will
force all of the points to be joined by a lin
on 08/17/2008 07:15 PM [EMAIL PROTECTED] wrote:
> I was trying to do what is on page 70 of John Chambers' new book namely
> using trace to invoke the browser by doing
>
> trace(zapsmall, edit = TRUE)
>
> but , typing above at an R prompt, I get
>
> trace(zapsmall, edit=TRUE)
> sh: EMACS: comman
My previous problem with the emacs editor was that I had
options(editor="EMACS", when it should have been small letters as in
options(editor="emacs",papersize="letter", width=180, htmlhelp=FALSE,
browser="/usr/bin/firefox")
Thanks for the help that I'm confident would have been there if I di
I was trying to do what is on page 70 of John Chambers' new book namely
using trace to invoke the browser by doing
trace(zapsmall, edit = TRUE)
but , typing above at an R prompt, I get
trace(zapsmall, edit=TRUE)
sh: EMACS: command not found
Error in edit(name, file, title, editor) :
problem
Hello everybody,
In am trying to analyse a BACI experiment and I really want to do it
with R (which I find really exciting). So, before moving on I though it
would be a good idea to repeat some known experiments which are quite
similar to my own. I tried to reproduce 2 published examples but
On Sun, 17 Aug 2008, [EMAIL PROTECTED] wrote:
Dear Achim, R Users,
What am I doing wrong in this example ?
The Granger test of x and y with lag k tests the significance of the x
variables in
y ~ Lags(y, 1:k) + Lags(x, 1:k)
If x is already a lag of y (as in your example), this is not reall
>
> The following code is inspired by the help file for the relist()
> function (see?relist), which explicitly details how you can use a
The example is in the 'Details' section and, indeed, it looks like it no
longer works.
> relistable object in conjunction with optim to pass and reconstruct
> c
I should let you guys know that I figured this whole axes on filled contour
plots issue out. This might not be the most elegant solution but it will
work me:
filled.contour(contour, axes=F, frame.plot=TRUE, color=terrain.colors, ylab=
"Length Along Flume (m)", key.title = title(main="Velocity\n(m
Dear all,
The following code is inspired by the help file for the relist()
function (see?relist), which explicitly details how you can use a
relistable object in conjunction with optim to pass and reconstruct
complex parameter structures/groupings. The idea is that the optim()
function can only wo
Hi
Patrick Connolly wrote:
> The following code, though not brilliant, works on an A4 page. It
> might look odd on other devices of a very different size.
>
> =X8--- cut here
> require(grid)
> wide <- 15
> vps <- grid.layout(nrow = 3, ncol = 4,
On Sun, 17 Aug 2008, Duncan Murdoch wrote:
Shengqiao Li wrote:
Dear all,
Recently I am generating large random samples (10M) and any duplicated
numbers are not desired.
We tried several RNGs in R and found Wichmann-Hill did not produce
duplications.
The duplication problem is the interest
Hi all,
First, a quick thank you for R; it's amazing.
I am trying to fit models for a count dataset following the overdispersed
logisitic regression approach outlined in Baggerly et al. (BMC Bioinformatics,
5:144; Annotated R code is given at the end of the paper) but R is returning an
error w
This is probably a basic data manipulation issue and an easy answer, but
I can't seem to make it work. I am more used to working with data by
participant, not by answer.
I have survey data, one answer per line (18000+ lines and counting), and
each line includes variables for:
prepost (0 for
The few times I want to patch a function like this, I use:
unlockBinding(name, env);
assignInNamespace(name, value, ns=pkgName, envir=env);
assign(name, value, envir=env);
lockBinding(name, env);
/Henrik
On Sun, Aug 17, 2008 at 10:50 AM, Gabor Grothendieck
<[EMAIL PROTECTED]> wrote:
> In
In that case add this:
unlockBinding("strucplot", as.environment("package:vcd"))
assign("strucplot", my.strucplot, "package:vcd")
On Sun, Aug 17, 2008 at 1:22 PM, Ben Bolker <[EMAIL PROTECTED]> wrote:
> Gabor Grothendieck gmail.com> writes:
>
>>
>> Check out:
>>
>> ?assignInNamespace
>>
>> On
Thanks, Gabor
For the record, what I was looking for is accomplished by
> source("c:/R/mosaics/strucplot-MF.R")
> assignInNamespace("strucplot",strucplot, ns="vcd")
-Michael
Gabor Grothendieck wrote:
Check out:
?assignInNamespace
On Sun, Aug 17, 2008 at 12:42 PM, Michael Friendly <[EMAIL PR
Jim,
Thanks so much for getting back to me. Axis.mult could definitely work so me
although there still appear to be a couple hiccups. I've included a .png
file of my plot rather than trying to explain it. I have for explanatory
purpose not called to plot with "axes=F". This illustrates that the
a
Gabor Grothendieck gmail.com> writes:
>
> Check out:
>
> ?assignInNamespace
>
> On Sun, Aug 17, 2008 at 12:42 PM, Michael Friendly wrote:
> > I'm trying to test an extension of mosaic() from the vcd package that
> > requires a change to the
> > basic strucplot() function from that package. I
Check out:
?assignInNamespace
On Sun, Aug 17, 2008 at 12:42 PM, Michael Friendly <[EMAIL PROTECTED]> wrote:
> I'm trying to test an extension of mosaic() from the vcd package that
> requires a change to the
> basic strucplot() function from that package. I want to test my change by
> sourcing t
I'm trying to test an extension of mosaic() from the vcd package that
requires a change to the
basic strucplot() function from that package. I want to test my change
by sourcing the
replacement function into my R session.
But when I do that,
source("c:/R/mosaics/strucplot-MF.R")
and run my ext
Hi Gabor,
Perhaps, I should have been clearer.
In the subject like, I put "grangertest/lmtest" to indicate the
grangertest function in the lmtest package.
Later in the example, I am specifically talking about granger.test in the
MSBVAR package (which is not failing, as in the example at the v
There is something wrong with the description below
since MSBVAR has granger.test, not grangertest,
and it takes 2 args, not 3. This refers to 0.3-1 of
MSBVAR.
On Sun, Aug 17, 2008 at 9:07 AM, <[EMAIL PROTECTED]> wrote:
> Dear Achim, R Users,
>
> What am I doing wrong in this example ?
>
> a<-zo
Dear Achim, R Users,
What am I doing wrong in this example ?
a<-zoo(rnorm(100),order.by=1:100)
b<-lag(a)
regr<-na.exclude(merge(a,b))
plot(regr)
grangertest(regr[,1],regr[,2],3)
> a<-zoo(rnorm(100),order.by=1:100)
> b<-lag(a)
> regr<-na.exclude(merge(a,b))
> plot(regr)
> grangertest(regr[,1],reg
Actually I was suspected that 'r cmd build' search for 'C:/DOCUME~1/c-
dutang/Local' and not 'C:/DOCUME~1/c-dutang/Local Settings'.
I will check (tomorrow) if there are any spaces in environment
variables TMP*.
Thanks for your suggestion.
Christophe
Le 17 août 08 à 14:08, Prof Brian Riple
Does your setting of TMPDIR, TEMP or TMP have a space in it?
From the R-admin manual:
You may need to set TMPDIR to the absolute path to a suitable temporary
directory: the default is 'c:/TEMP'. (Use forward slashes and do not
use a path including spaces.)
The documentation is that man
Thanks Barry, that works beautifully!
Roger
Barry Rowlingson schreef:
2008/8/17 Roger Leenders <[EMAIL PROTECTED]>:
WinXP, R2.7.1
Thanks so much to all who have reponded to my inquery. The solutions are
most helpful.
There is only one final thing that I can't seem to get right.
All of th
On Sat, 2008-08-16 at 14:28 -0700, hippie dream wrote:
> I am still struggling on how edit axes on a filled contour plot. I have
> managed to figure out how to place labels on the key of this graph but how
> to place the axes I want on this plot still eludes me. This command produces
> the plot I a
The following code, though not brilliant, works on an A4 page. It
might look odd on other devices of a very different size.
=X8--- cut here
require(grid)
wide <- 15
vps <- grid.layout(nrow = 3, ncol = 4,
widths = unit(rep(1,
Shengqiao Li wrote:
Dear all,
Recently I am generating large random samples (10M) and any duplicated
numbers are not desired.
We tried several RNGs in R and found Wichmann-Hill did not produce
duplications.
The duplication problem is the interesting birthday problem. If there are
M possible
Hi,
I'm trying to compile the package biglm, but when I build it with R
CMD build biglm, it failed :
C:\LOCAL\c-dutang\code\R\biglm2>R CMD build biglm
* checking for file 'biglm/DESCRIPTION' ... OK
* preparing 'biglm':
* checking DESCRIPTION meta-information ...C:/DOCUME~1/c-dutang/Local:
C
Michael Braun MIT.EDU> writes:
>
> Dieter:
>
> Thank you for your response. As you requested, I created a self-
> running example, pasted below. It may be a little wordier than I
> would like, but it runs.
.. Details removed
>
> panel.ppc.plot <- function(...,group.number) {
>
>if (
2008/8/17 Roger Leenders <[EMAIL PROTECTED]>:
> WinXP, R2.7.1
>
> Thanks so much to all who have reponded to my inquery. The solutions are
> most helpful.
> There is only one final thing that I can't seem to get right.
> All of the proposed solutions yield a figure that is not quite round, but is
>
WinXP, R2.7.1
Thanks so much to all who have reponded to my inquery. The solutions are
most helpful.
There is only one final thing that I can't seem to get right.
All of the proposed solutions yield a figure that is not quite round,
but is wider than its height. This can be resolved by manuall
On Sat, 16 Aug 2008, ldotero wrote:
Dear All:
I need some guidance in calculating a goodness-of-fit statistic for a Tobit
Regression model.
To develop the Tobit regression, I used the tobit() method from the AER
package, which is basically a simpler interface to the survreg() method.
I've read
48 matches
Mail list logo