On 08/20/2013 11:41 AM, ivo welch wrote:
A second enhancement would be a "smart string", which knows that
everything inside {{...}} should be evaluated.
stopifnot( is.matrix(m), "m is not a matrix, but a {{class(m)}}" )
a variant with more traditional syntax might be
if (!is.matrix(m))
> first, I think it would be more useful if it had an optional character
> string, so users could write
>
> stopifnot( is.matrix(m), "m is not a matrix" )
>
Another option is to just generate better error messages automatically, e.g.:
> library(assertthat)
> x <- 1:10
> assert_that(is.matrix(x)
functionality is nice. syntax is weird. I think I would have
preferred an "interpolate" function call.
stop( i("class is `class(pi)` and $pi") )
three typing letters, too, and more logical. most importantly, I wish
we had some form of this in base R from the outset--whatever it is--so
that m
On Tue, Aug 20, 2013 at 6:00 PM, ivo welch wrote:
> character string at the end of an existing function, stopifnot(). (2)
> I think "estrings" (that behave like characters but are interpolated
> before printout) are useful in the same way perl interpolated strings
> are useful.
The gsubfn packag
thx, deepayan: how is stopifnot better than
if (!all(...)) stop()
given that we have stopifnot() and I have seen it used often, I think
my two suggestions would make it better.
thx, michael: the %and% and %or% constructs are indeed relics of my
perl background. my own definition is
`%and%`
If all you care about is emulating static type checking, then you can also
accomplish the same thing with lambda.r using type constraints on function
definitions.
e.g.
> f(m) %::% matrix : matrix
> f(m) %as% { m }
> f(as.data.frame(matrix(rnorm(12),nrow=3)))
Error in UseFunction("f", ...) : No
> my own programming variant looks even nicer,
>is.matrix(m) %or% "m is not a matrix but a {{class(m)}}"
But it does not act nicely. All %anything% constructs have the
same precedence, that of %*%. Hence
x==3 %or% "x is not three"
is parsed as
x == ( 3 %or% "x is not three" )
which is
On Tue, Aug 20, 2013 at 11:41 AM, ivo welch wrote:
> I am using a variant of stopifnot a lot. can I suggest that base R
> extends its functionality? I know how to do this for myself. this is
> a suggestion for beginners and students. I don't think it would break
> anything.
>
> first, I think
On Aug 20, 2013, at 14:41, ivo welch wrote:
> A second enhancement would be a "smart string", which knows that
> everything inside {{...}} should be evaluated.
I think one the HTML templating libraries (whisker or mustache or some such)
provides something not unlike this. Perhaps take a look
Thank you, it does work now indeed. My platform is 32 bit.
-- Txikiak
On 08/20/2013 12:00 PM, r-devel-requ...@r-project.org wrote:
Date: Mon, 19 Aug 2013 14:08:33 +0100
From: Prof Brian Ripley
To: r-devel@r-project.org
Subject: Re: [Rd] Issues in installing R-devel
Message-ID: <521218d1.1050.
On Wed, Aug 21, 2013 at 12:11 AM, ivo welch wrote:
> I am using a variant of stopifnot a lot. can I suggest that base R
> extends its functionality? I know how to do this for myself. this is
> a suggestion for beginners and students. I don't think it would break
> anything.
>
> first, I think
I am using a variant of stopifnot a lot. can I suggest that base R
extends its functionality? I know how to do this for myself. this is
a suggestion for beginners and students. I don't think it would break
anything.
first, I think it would be more useful if it had an optional character
string,
Hi Samuel,
WGCNA currently does not support calculations with matrices larger
than the old R limit, and it will take some time to update it to
support the large matrices. Furthermore, WGCNA relies on other
functions (most notably hclust) that would have to be updated as well
to support long vector
On Tue, Aug 20, 2013 at 9:23 AM, peter dalgaard wrote:
> What is bicor()? From the WGCNA package? Perhaps the package is doing
> something incompatible with the long vector support in R 3.0.0. You need to
> report such queries to the maintainer.
The maintainer is reporting for duty :)
The ver
Hi Sam,
I assume you mean that correlation for _genes_ (not samples)
11262:3 is 0? I am the maintainer of the WGCNA package but
unfortunately I don't have access to a Mac big enough to try
3x3 correlation matrix, but I would be thankful if you could
try reproducing the problem with sma
On Aug 19, 2013, at 20:53 , Shelton, Samuel wrote:
> Dear R developer,
>
> I am an R user and am currently having a problem with versions of R >3.0.0.
> We build larger correlation matrices of >3 with pairwise correlations
> made. We have been using a line of code
>
> simMat=bicor(datExpr
Dear R developer,
I am an R user and am currently having a problem with versions of R >3.0.0. We
build larger correlation matrices of >3 with pairwise correlations made. We
have been using a line of code
simMat=bicor(datExpr1,use="p")
To build the similarity matrix with datExpr1 being a ma
17 matches
Mail list logo