applies indeed:
In principle all these matrices should work like regular numeric
matrices, just faster with less memory foot print if they are
really sparse (and not just formally of a sparseMatrix class)
((and there are quite a few more niceties in the package))
Martin Maechler
(here, maintainer
ghtly enhancing the nice model-visualizing plot, you already now
get in R when you run
example(SSasymp)
or
example(SSasympOrig)
(but unfortunately, they currently use 'lwd = 0' to draw the asymptote
which shows fine on a PDF but not on a typical my screen graphics device.)
Ma
Fri, Oct 20, 2017 at 3:22 PM, David Winsemius
>> wrote:
>>
>>>
>>> > On Oct 20, 2017, at 11:11 AM, C W wrote:
>>> >
>>> > Dear R list,
>>> >
>>> > I came across dgCMatrix. I
>>>>> David Winsemius
>>>>> on Sat, 21 Oct 2017 09:05:38 -0700 writes:
>> On Oct 21, 2017, at 7:50 AM, Martin Maechler
wrote:
>>
>>>>>>> C W
>>>>>>> on Fri, 20 Oct 2017 15:51:
> Sorkin, John
> on Sun, 22 Oct 2017 22:56:16 + writes:
> David,
> Thank you for responding to my post.
> Please consider the following output (typeregional is a factor having two
levels, "regional" vs. "general"):
> Call:
> glm(formula = events ~ type, fam
ovoke a warning.
Once you have read (and understood) the above part of the help
page, it becomes, easy, no?
> tt <- read.table(textConnection("a 3.14"), colClasses =
> c("character","numeric"))
> t2 <- read.table(textConnection("a 3.14"),
&g
> Suzen, Mehmet
> on Mon, 30 Oct 2017 11:16:30 +0100 writes:
> Hi Frank, You could upload your R source file to a public
> URL, for example to github and read via RCurl, as source
> do not support https as far as I know.
well... but your knowledge is severely (:-) outdat
and install a current version
of R, and not waste any more bandwidth and R-help readers' time,
wouldn't we ?
> On 30 October 2017 at 15:51, Martin Maechler
> wrote:
>>>>>>> Suzen, Mehmet on Mon, 30 Oct 2017
>>>>>>> 11:16:30
no_ guarantee for that, and
unfortunately I think there's much software there where authors
don't care (or don't want) to use a "truly" free software
licence such as
(*) https://github.com/datacamp/datacamp-light/blob/master/LICENSE.md
Best,
Martin Maechler
> On 31
ON file:
This package ess is named to match the European Social Survey (ESS).
It is unrelated to the Emacs Speaks Statistics (ESS) project, an
emacs-based Integrated Development Environment hosted at
https://ess.r-project.org
and last but not least we have thought of 'reserving' ESSR
the R syntax for
indexing/subsetting is used here, i.e.
x[i] for LaTeX x_i
Last but not least, if Levent really needs bquote() [i.e. substitute()]
then, a final
as.expression(.)
may be needed :
identical(as.expression(quote(a == 1)),
expression( a == 1)) # -->
ode.
Note that for these reasons, often NaN and NA should not be
differentiated, and that's reason why using is.na(*) is
typically sufficient and "best" -- it gives TRUE for both NA and NaN.
Martin Maechler
ETH Zurich
__
R-help@r-project.o
ryCatch() instead of try() and then such things
can be done considerably less obscurely.
Best,
Martin Maechler, ETH Zurich
--
*) Using 'T' instead of 'TRUE' (of 'F' instead of 'FALSE' *is* unsafe):
a previous 'T <- 0' will change what yo
> $ : int [1:5, 1:2] 2 0 0 0 0 0 2 0 0 0
> $ : int [1:5, 1:2] 3 0 0 0 0 0 3 0 0 0
> Bill Dunlap
> TIBCO Software
> wdunlap tibco.com<http://tibco.com>
Yes, indeed, thank you Bill!
I sometimes marvel at how much the mental capacities of R core
are underesti
se the above grep
from Emacs (via 'M-x grep') or even better via a TAGS table
and M-x tags-query-replace I should be able to do the changes
pretty quickly... and will start looking into that later today.
Interestingly and to my great pleasure, the first part of the
'Sub
between R objects 'obj1' and 'obj2',
as all.equal() is generic and has a list method
(which works recursively) the "output may be huge, but then if there
is huge number of differences you would have found yourself
anyway, and will not need all.equal()
Martin Maechler
ETH Zu
uot;mailer daemon" error
b) it probably did go to the spammers: a legitimate user
would have replied to me.
Martin Maechler
ETH Zurich (= provider of all the r-*@r-project.org mailman mailing lists)
> On Tue, Apr 17, 2018 at 11:37 AM, Ulrik Stervbo
be anything (-> arbitrary extreme outliers).
There's the CRAN task view on robust statistical methods:
https://cran.r-project.org/web/views/Robust.html
Martin Maechler
ETH Zurich
> --
> Olivier Crouzet
> Assistant Professor
> @LLING UMR6310 - Université de Nan
or the
next release of the copula package...
but am a bit hesitant to complicate (and slowdown) the current
code by adding an extra check for this situation.
Martin Maechler
ETH Zurich
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
ht
K. Dovik
> Bergen, NO
yes, indeed, or -- even nicer for a time series:
using 'type = "c"' which many people don't know / have forgotten about:
ttt <- ts(rpois(12, lambda = 8), start = c(2000, 1), freq = 4)
plot (ttt, type = "c")
points(ttt, col = ifelse
Beautiful use of do.call() and lapply(), two of the most
versatile and important functions from the base R toolbox.
Congratulations!
Martin Maechler
R Core Team
> -Original Message-
> From: R-help On Behalf Of David L Carlson
> Sent: Wednesday, May 2, 2018 3:51 PM
> To:
e
pdf(*, compress=FALSE)
actually also setting 'encoding=.' and 'paper=.', see the R sources at
https://svn.r-project.org/R/trunk/tests/reg-plot.R
and the check (source at
https://svn.r-project.org/R/trunk/tests/Makefile.common)
basically is using
R CMD Rdiff .p
> Sarah Goslee
> on Wed, 30 May 2018 05:03:56 -0400 writes:
> Hi,
> You're mixing base plot and ggplot2 grid graphics, which as you've
> discovered doesn't work.
> Here's av strategy that does:
> https://cran.r-project.org/web/packages/egg/vignettes/Ecosystem.html
> Ted Harding
> on Thu, 31 May 2018 07:10:32 +0100 writes:
> Well pointed out, Jim!
> It is infortunate that the documentation for options(digits=...)
> does not mention that these are *significant digits*
> and not *decimal places* (which is what Joshua seems to wan
label.pos
>text.panel(xlp, ylp, labels[i], cex = cex.labels,
> font = font.labels)
> }
> }
> else if (i < j)
> localLowerPanel(as.vector(x[, j]), as.vector(x[,
> i]), ...)
&g
>>>>> Martin Maechler
>>>>> on Thu, 7 Jun 2018 18:35:48 +0200 writes:
>>>>> Gerrit Eichner
>>>>> on Thu, 7 Jun 2018 09:03:46 +0200 writes:
>> Hi, Chris, had the same problem (and first thought it was
>> my
>>>>> Martin Maechler
>>>>> on Fri, 8 Jun 2018 11:13:24 +0200 writes:
[..]
>> Thank you, Chris, for the report and
>> Gerrit for your proposed fix !!
>>
>> It looks good to me, but I will test some more (also
>>>>> Gerrit Eichner
>>>>> on Fri, 8 Jun 2018 12:55:31 +0200 writes:
> Am 08.06.2018 um 12:02 schrieb Martin Maechler:
>>>>>>> Martin Maechler
>>>>>>> on Fri, 8 Jun 2018 11:13:24 +0200 writes:
>
The answer to your Q is surely a "no": That's exaxtly the point of tapply
that the number of y values may vary. The msg tells you that the x & y full
vectors must have the same length.
Hoping that helps.
Martin
[[alternative HTML version deleted]]
> Doran, Harold
> on Wed, 25 Jul 2018 14:57:13 + writes:
> I'm doing some work now to learn which SQL database
> package is the most optimal for the task I am working on.
Hmm... we would have a problem with optimize() and optim() if
this was
optimal << more optima
> Duncan Murdoch
> on Thu, 28 Jun 2018 20:57:19 -0400 writes:
> On 28/06/2018 5:29 PM, Jeff Reichman wrote:
>> R-Help
>>
>>
>>
>> Is there a way to make a rectangle transparent (alpha=0.1??)
>>
>>
>>
>> plot(c(100, 200), c(300, 450), type=
> J C Nash
> on Tue, 18 Apr 2017 13:32:52 -0400 writes:
> Recently Marie Boehnstedt reported a bug in the nlm()
> function for function minimization when both gradient and
> hessian are provided.
Indeed, on R's Bugzilla here :
https://bugs.r-project.org/bugzilla/sh
.y.0") release of R
and **not** re-use packages {inside R-x.y.z}
that were installed with R-x.(y-1).z' ..
and of course Uwe is right:
We should ask others to do it _and_ do it ourselves.
Anyway it _is_ considerably more important for the 3.4.0
release.
Martin Maechler
ETH Zurich (and
> Ashim Kapoor
> on Tue, 25 Apr 2017 14:02:18 +0530 writes:
> Dear all,
> I am not able to understand the interplay of absolute vs relative and
> tolerance in the use of all.equal
> If I want to find out if absolute differences between 2 numbers/vectors
are
> big
> Ramnik Bansal
> on Sat, 20 May 2017 08:52:55 +0530 writes:
> Taking this question further.
> If I use a complex number or a numeric as an operand in logical
> operations, to me it APPEARS that these two types are first coerced to
> LOGICAL internally and then THIS lo
> Patrick Connolly
> on Tue, 23 May 2017 20:47:22 +1200 writes:
> On Mon, 22-May-2017 at 05:43AM -0400, Martin Morgan wrote:
> |> On 05/22/2017 05:10 AM, Patrick Connolly wrote:
> |> >Apparently it isn't harmless.
> |> >
> |> >>install.packages("withr")
> |> >
> David Winsemius
> on Wed, 21 Jun 2017 18:04:13 -0700 writes:
>> On Jun 21, 2017, at 1:39 PM, Conklin, Mike (GfK)
wrote:
>>
>> I have a Ubuntu server with an R installation that has 384 packages
installed. We are trying to replicate the system on a Red Hat Enterprise
> Yogesh Gupta
> on Wed, 21 Jun 2017 13:42:15 +0900 writes:
> I am trying to make dendogram based on gene expression matrix , but
getting
> some error:
> I
> countMatrix = read.table("count.row.txt",header=T,sep='\t',check.names=F)
> colnames(countMatrix)
>
> Jonathan Fritzemeier
> on Fri, 23 Jun 2017 16:15:30 +0200 writes:
> Hi,
> I recognized that the function 'setReplaceMethod' is creating a
> character vector in the user workspace having the name (e.g. "newClass")
> of the class used as value. If you can sort out a mi
upid. the text file
itself
>>> is 4GB
>>> so cannot upload it to bugzilla, and from the
>>> R_AllocStringBugger error
>>> in the previous message, i think most or all of it needs to be
>>> there to
>>> trigger the seg
arts of the help page,
I see that there is a 'graphics.reset' argument which you can
set to TRUE in such a case:
image.plot(D, col=rev(heat.colors(128)),bty="n", xlab="Lines",
ylab="Columns", cex.lab = 0.5,
zlim= range(D, na.rm=TRUE),
> Hi Rosa
> something like
> plot(1,1, sub=expression(lambda^"2"))
> So with your example, do you want something like
> plot(c(1:5), CRP7raw[1,], type = "n", xlim=c(1,5), ylim=c(-10,5) ,
> xlab="Day in ICU",
> ylab="CRP (mg/dL)",
> sub = mtext(expression(lambda^2)))
OOps! E
>>>>> PIKAL Petr
>>>>> on Mon, 31 Jul 2017 09:11:18 + writes:
> Hi Martin see in line
>> -Original Message- From: Martin Maechler
>> [mailto:maech...@stat.math.ethz.ch] Sent: Monday, July
>> 31, 2017 10:52 A
in your case)
>> I am posting plain text here:
good .. and please do always on these lists
Martin Maechler, ETH Zurich & R Core
>>
>>> library(tmvtnorm)
>>> meann = c(55, 40, 50, 35, 45, 30)
>>> covv = matrix(c( 1, 1, 0, 2, -1, -
n package 'stats') just to help people
to write more nicely readable code:
Your function f() below then becomes a simple one-liner:
f <- function(foo, bar) setNames(list(bar), foo)
Martin Maechler
ETH Zurich and R Core
> Giovanni
> On Fri, Aug 4, 2017 at 12:13 P
> Richard M Heiberger
> on Mon, 14 Aug 2017 14:36:40 -0400 writes:
> Please look at ?datasets::randu
> for David Donoho's translation of RANDU into R.
Thanks a lot, Rich, for pointing to this:
Indeed, the RANDU aka 'randu' data set has been part of R since
the last millenn
rge-correctly EM algorithm.
After
install.packages("nor1mix")
require("nor1mix")
?norMixMLE
Martin Maechler,
ETH Zurich
> On Sun, 27 Aug 2017 16:01:59 +0300 Ismail SEZEN
> wrote:
>> Dear Niharika,
>>
>> As I said before, the
> peter dalgaard
> on Fri, 8 Sep 2017 16:12:21 +0200 writes:
>> On 8 Sep 2017, at 15:51 , Martin Møller Skarbiniks
>> Pedersen wrote:
>>
>> On 8 September 2017 at 14:37, peter dalgaard
>> wrote:
>>>
>>>
On 8 Sep 2017, at 14:03 , peter dalgaard
ly, the same source file, /src/library/stats/R/zzzModels.R
also defines the SSfpl() == 4-parameter logistic model
and there, the 'init' function needs to do the same scaling to
(0, 1) and does it much nicer, indeed (anti)symmetrically.
I'm looking into using that in SSlogis
> Cheers
> Petr
>> -Original Message-
>> From: Martin Maechler [mailto:maech...@stat.math.ethz.ch]
>> Sent: Friday, October 20, 2017 1:04 PM
>> To: PIKAL Petr
>> Cc: Wall, Wade A ERDC-RDE-CERL-IL CIV ; r-
> Brian Smith
> on Thu, 19 May 2016 11:04:55 -0400 writes:
> Thanks all !! On Thu, May 19, 2016 at 9:55 AM, Ivan
> Calandra wrote:
>> Hi,
>>
>> You can do it by first plotting your values without the
>> x-axis: plot(x,y,log="xy", xaxt="n")
>>
>> an
der of magnitudes
better, and
- for the simple case you were shown to use logical indexing,
i.e., calls à lax[x > k] <- ..
In summary:
Use ifelse() much less -- notably if writing
functions/code which should scale !
Martin Maechler
ETH Zurich
> Ben Bolker
> on Sat, 28 May 2016 15:42:45 + writes:
> Anthony Damico gmail.com> writes:
>>
>> hi, here's a minimal reproducible example that crashes my
>> R 3.3.0 console on a powerful windows server. below the
>> example, i've put the error (not crash) th
> Perfect!
> Exactly what I was looking for.
> Thanks
> Lorenzo
> On Fri, May 27, 2016 at 01:50:03PM +0200, Christian Brandstätter wrote:
>> Hi Lorenzo,
>>
>> Try:
>>
>> tt[is.nan(tt)] <- NA
>> tt <- na.omit(tt)
>>
or simply na.omit(tt)
as it omits both NA and NaN (and *does* keep the 'ts'
> Jim Lemon
> on Thu, 2 Jun 2016 13:03:01 +1000 writes:
> Hi ce,
> a<-10
> condition<-expression("a>0")
> if(eval(parse(text=condition))) cat("a>0\n")
While this may answer the question asked,
the above is *not* good advice, excuse me, Jim :
> fortune(106)
If the a
;))
[1] "base" "compiler" "datasets" "graphics" "grDevices" "grid"
[7] "methods" "parallel" "splines" "stats" "stats4""
has sections about this, notably
https://cloud.r-project.org/bin/linux/debian/
will tell you how to tell your debian system to get R from
CRAN as opposed from the debian repositories.
> Thanks in advance
You are welcome,
Martin Maechler
> Sincelerly,
> Mbr
se: to fit very skewed
distributions, given two quantiles and the mean only, and the
approach taken by the "poweRlawyers", namely to minimize the KS
(Kolmogorov-Smirnoff) decrepancy seems a good start to me.
Martin Maechler,
ETH Zurich
> Jim
> On Tue, Jul 19, 2016 a
orted when R was compiled against readline >= 6.0 (Ctrl-G
always worked). (PR#16603)
So we had hoped that change (fixing a bug you *should* have been
able to see with readline 6.2, as well) would work correctly in all
versions of readline >= 6.0,
but evidently it did not in yours.
M
ry reliable implementations
(based on QR) indeed. For a year or so now, there's the bare
bone .lm.fit() which is even one order of magnitued factor
faster than lm.fit() at least for simple cases, see the final
example on the ?.lm.fit help page.
Martin Maechler
(who had added .lm.fit() to R )
>>>>> Ralf Goertz
>>>>> on Fri, 22 Jul 2016 10:15:36 +0200 writes:
> Am Thu, 21 Jul 2016 18:07:43 +0200 schrieb Martin Maechler
> :
>> Ralf Goertz on Wed, 20 Jul 2016
>> 16:37:53 +0200 writes:
>>> I install
Multivariate Analysis'
- for more specific help and expertise, I strongly recommend
the dedicated R-SIG-robust mailing list (instead of R-help),
--> https://stat.ethz.ch/mailman/listinfo/r-sig-robust
Best regards,
Martin Maechler, ETH Zurich
> [[alternative HTML v
of the CRAN packages and some of the "teaching
setups" would do that (and if you do that, the lm() and t.test()
calls above give an error).
Of course, there's much more to say about this, quite a bit of which
has been published in scientific papers and books..
Martin Maechler
>>>>> peter dalgaard
>>>>> on Tue, 26 Jul 2016 23:30:31 +0200 writes:
>> On 26 Jul 2016, at 22:26 , Hadley Wickham
>> wrote:
>>
>> On Tue, Jul 26, 2016 at 3:24 AM, Martin Maechler
>> wrote:
>>
> Loris Bennett
> on Mon, 8 Aug 2016 14:12:47 +0200 writes:
> Loris Bennett writes:
>> Thanks for the link, John. However, there is a hyphen missing. It
>> should be:
>>
>>
http://www.dummies.com/how-to/content/how-to-read-errors-and-warnings-in-r.html
>>
y leave their son, Fabian, and their daughter-in-law Viktoria.
Our thoughts are with them.
Sincerely,
Martin Maechler, ETH Zurich (Seminar for Statistics)
Adrian Trapletti, Uster Metrics
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more
here
http://bit.ly/MRE_R (nice to remember: MRE = Minimal Reproducible Example)
or here
http://adv-r.had.co.nz/Reproducibility.html
then we will be glad to help you,
notably I as maintainer of the package 'copula' which you are
using (without saying so).
With regards,
Martin Maechler
16 at 4:28 PM, Isaudin Ismail
> wrote:
>> Dear Dr. Martin,
>>
>> I'm glad that you replied to my queries.
>>
>> As advised, I have prepared the following:
MM: I'm including (cut'n'pasting) my commented and augmented version he
> Jeff Newmiller
> on Tue, 30 Aug 2016 09:36:05 -0700 writes:
> You cannot. However, you can load the file into a dedicated environment
to keep those names separated from your global environment. e.g. [1]
yes, that's my "famous" only-allowed use of attach() :
attach() an rda-f
arting value': The help page shows how to use
kmeans() for "somewhat" reliable starts; alternatively, I'd
recommend using cluster::pam() to get a start there.
I'm glad to hear about experiences using these / comparing
these with other approaches.
Martin
--
Martin Maechle
> Marc Schwartz
> on Thu, 8 Sep 2016 22:29:38 -0500 writes:
>> On Sep 8, 2016, at 7:35 PM, Bert Gunter wrote:
>>
>> To all:
>>
>> r-help has been holding up a lot of my recent messages: Have there
>> been any changes to help list filters that caused this? Is
> Joe Ceradini
> on Tue, 20 Sep 2016 17:06:17 -0600 writes:
> read.csv("your_data.csv", stringsAsFactors=FALSE)
> (I'm just reiterating Jianling said...)
If you do not have very many columns, and want to become more
efficient and knowledgeable,
I strongly recommend alternativ
> paul
> on Thu, 16 Apr 2015 18:58:12 + writes:
> Because of the setup of R in cygwin, help.start() requires
> the following parameter values:
> help.start(browser="cygstart",remote=R.home())
> Is it possible to make these values the default?
You are building R
er behavior: If an
e-mail "may have been lost", rather send it again.
As some say: Better error on the safe side.
Martin Maechler
ETH Zurich
> Thanks!
> Ivan
> --
> Ivan Calandra, ATER
> University of Reims Champagne-Ardenne
> 51100 Reims, France
> Paul
> on Wed, 22 Apr 2015 01:39:16 + writes:
> William Dunlap tibco.com> writes:
>> Use the str() function to see the internal structure of most
>> objects. In your case it would show something like:
>>
>> > Data <- data.frame(theData=round(sin(1:38),1))
> Steve Taylor
> on Thu, 23 Apr 2015 23:32:00 + writes:
> This works for me...
> get0 = function(x) get(x,pos=1)
> sapply(big.char, get0)
Note that get0() is a _ somewhat important for efficient code _
new function since R 3.2.0
so you'd rather call your functions di
namely directly call
.C(), .Fortran(), .Call() or similar (.Internal(), .External(),..)
it is typically easy to trigger segfaults, and then the bug is
in the user's R code.
Variations of the above involve using the inline package, or
other interfaces to C/C++/... code, libraries, etc: The bug ma
details to you, and many such e-mail
interfaces behaving like Windows programs, that e-mail software may choose
the MIME type (it uses for the attachments it puts into the
e-mail it sends in your behalf) depending on the file extension.
So, from the naive user's point of view with his only e-mail
you ask for help here
or another public forum.
(I would also think it to be polite to the maintainer who has
volunteered her/his code to be used by you if you give him an
opportunity to see, comment and fix the problem)
Martin Maechler
ETH Zurich
__
R-
r.
With thanks to Bill and Pavel,
Martin Maechler
ETH Zurich
> I made the file KE.rda containing the Matrix objects K and
> E constructed in calc.diffusion.kernel by adding a save()
> call just before where R dies in the original example:
> K = lam$values[1] * I - M
&g
ght make some of the coding of the pdf and cdf more simple.
Well.
To: David Winsemius
Subject: Re: [R] package implementing continuous binomial?
In-Reply-To: <5425134b-6aa1-4246-bcd4-d4be4be23...@comcast.net>
References: <554ac75a.8070...@gmail.com>
<5425134b-6aa1-4246-bcd
f the list on R-devel,
archived at
https://stat.ethz.ch/pipermail/r-devel/2015-May/071208.html
For the R foundation,
Martin Maechler, Secretary General
___
r-annou...@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-ann
e result
follows.
Dear Christophe,
can you please specify the exact sessionInfo() ?
(after loading both kml and lme4).
'Matrix' has been updated on CRAN very recently, and
'lme4' is about to be update very soon,
so this *is* a somewhat interesting and important problem,
>>>>> Martin Maechler
>>>>> on Fri, 5 Jun 2015 11:33:46 +0200 writes:
>>>>> Christophe Genolini
>>>>> on Fri, 5 Jun 2015 00:36:42 -0700 writes:
>> Hi all,
>> There is a compatibility issue between the p
> Martin Morgan
> on Thu, 4 Jun 2015 10:33:37 -0700 writes:
> On 06/04/2015 10:08 AM, cgenolin wrote:
>> Hi the list,
>>
>> I have a variable y that is either NA or some S4 object. I would like to
>> know in which case I am, but it seems taht is.na does not work w
> Christophe Genolini
> on Fri, 5 Jun 2015 00:36:42 -0700 writes:
> Hi all,
> There is a compatibility issue between the package 'lme4' and my package
> 'kml'. I define the "[" operator. It works just fine in my package (1).
If I
> try to use the lme4 package, then it
means you are sure that your data frame
only contains "classical numbers" (no factors, no 'Date's,
no...).
In such a case, transform your data frame to a numerical matrix
*once* preferably using data.matrix() instead of just as.matrix()
but in this case it should not matter.
The
7;!=" or %in% ...)
in too many places; though it may work fine in your test cases,
it is wrong to be used in generality e.g. inside a function you
provide for more general use,
and is best replaced with the use of inherits() / is()
everywhere "out of principle".
Martin Maechler
ET
n, and only then start
evaluating "the arithmetic".
But that *does* look like implementation of
Maple/Mathematica/... in R and that seems silly; rather R
should interface to Free (as in "speech") aka "open source"
symbolic math packages such as Pari, ma
ays works:
x == y & is.na(x) == is.na(y)
seq(x)[!(x == y & is.na(x) == is.na(y))]
With output :
> x <- c(NA, 1:7)
> y <- c(11:17, NA)
> ## now this
> seq(x)[ - which(x == y) ] ## gives not what you expect
integer(0)
> ## But logical indexing always
ducible example.
If OTOH, it is your nonlinear function that "goes haywire",
the implicit blame on nlme would not be warranted.
Martin Maechler,
ETH Zurich and R Core team
> On Tue, Dec 2, 2014 at 1:59 PM, Ramiro Barrantes
> wrote:
>> Thanks so much for your re
only made possible by the dedicated
work of many thousands of volunteers and their contributions in several ways,
including to become supporting (or ++) members of the R foundation!
Martin Maechler
___
r-annou...@r-project.org mailing list
https://stat.ethz.
expr min lq mean median uq max neval cld
r1 <- ifelse(z > 3, x, y) 4466 4971.5 5498.928 5244 5673.5 31705 1000 b
r2 <- if (z > 3) x else y 171 212.0 265.241264 291.0 3130 1000 a
>
i.e., roughly a factor of 20 times mo
t.ethz.ch/R-manual/
(which I think is one of the oldest still working R related "web pages"
... and yes, it shows its age :-)
> If not, is it feasible to make them available?
The drawback of the above is that you see the future versions of
the manuals and I agree that it
> Monnand
> on Wed, 14 Jan 2015 07:17:02 + writes:
> I know this must be a wrong method, but I cannot help to ask: Can I only
> use the p-value from KS test, saying if p-value is greater than \beta,
then
> two samples are from the same distribution. If the definition
> Philipp A
> on Wed, 14 Jan 2015 14:02:40 + writes:
> Hi,
> creating a matrix from two vectors a, b by multiplying each combination
can
> be done e.g. via
> a %*% t(b)
> or via
> outer(a, b) # default for third argument is '*'
really the best (most e
rmultinom(), rnorm(), ...] so we,
the maintainer of 'arules' Michael Hahsler (BCC'ed: use
maintainer("arules") to find such an e-mail address),
and myself can look if and how that limitation might be lifted.
Best regards,
Martin Maechler, ETH Zurich
__
does *not* work... (as I first thought).
However, slightly shorter and easier and maybe even easier to remember than
z$x <- factor(as.character(z$x), levels = c(levels(z$x)[3:1])) ## def. level
order
is
z$x <- factor(z$x, levels = levels(z$x)[3:1]) ## def. level order
Martin Maec
> Jim Lemon
> on Mon, 26 Jan 2015 11:21:03 +1100 writes:
> Hi Allen, How about this:
> sum_w_NA<-function(x) ifelse(all(is.na(x)),NA,sum(x,na.rm=TRUE))
Excuse, Jim, but that's yet another "horrible misuse of ifelse()"
John Fox's reply *did* contain the "proper" solution
> All the more reason to use = instead of <-
Definitely not!
(As you were told, there are other drawbacks).
R does not have to look like C, it *is* different in many ways.
If you use a decent IDE for R, you get spaces around ' <- ' for
free: Both in ESS and in Rstudio, you can use "[Alt] -"
1 - 100 of 837 matches
Mail list logo