Displaying 20 results from an estimated 1100 matches similar to: "valgrind issue in core R 3.5"
2019 Apr 05
2
patch to improve matrix conformability error message
With this patch,
> A <- matrix(1, 2, 2)
> B <- matrix(2, 3, 2)
> A %*% B
Error in A %*% B :
non-conformable arguments of dimension (2, 2) and (3, 2)
>From 205b591d4d14b5ff667325fb233a6deb08314726 Mon Sep 17 00:00:00 2001
From: Joshua Nathaniel Pritikin <jpritikin at pobox.com>
Date: Fri, 5 Apr 2019 12:03:58 -0400
Subject: [PATCH] Improve non-conformable arguments error
2013 Jun 06
1
dmvnorm
Summary:
+ I am writing an R extension that needs to call dmvnorm more than
10,000 times during a model fitting computation.
+ My extension uses openmp for parallel execution.
+ As of R 3.0, it is no longer permitted for threads to call the R
interpreter because there is a stack overflow check that always trips
because the thread's stack is different from what R is expecting.
+
2012 Mar 15
1
how to assign "writeLines" function
hi,
what I want to do is assigning following code to any object.
k<-paste("thank")
writeLines(strwrap(k, width = 80,indent = 7,exdent = 6))
To assign the "writeLines" code,
I try this
a<-writeLines(strwrap(k, width = 80,indent = 7,exdent = 6))
or
assign(a,writeLines(strwrap(k, width = 80,indent = 7,exdent = 6)))
but it doesn't work.
is there any way to solve
2018 May 31
3
mysterious rounding digits output
R version 3.5.0 (2018-04-23) -- "Joy in Playing"
Platform: x86_64-pc-linux-gnu (64-bit)
options(digits=3)
itemInfo <- structure(list("aaa" = c(1.39633732316667, 1.32598263816667, 1.11658324066667, 1.23651072616667, 1.05368679983333, 1.03100737383333, 0.9630728395, 0.7483865045, 0.620086646166667, 0.5411017985, 0.496397607833333, 0.459528044666667, 0.427877047833333,
2011 Aug 16
3
Text wrap
Hi everyone.
I have a long label that I would like to split. I found that I could use
"strwrap" for simple text. However, this is not working with this label:
str = expression(paste("< 20 ?m phytoplankton ","(cells ? ",mL^-1,")"))
plot(...., ylab = strwrap(str,20),...)
I suspect this is because I'm using "expression" for form my label.
2001 Oct 26
3
warnings --- wish/bug (PR#1148)
When R prints warnings, they often go "out of the line", it would be
better if they where wrapped with
writeLines(strwrap ...
I tried to do that , changing the function warnings, but it has only
effect when called explicitely, not when R prints the warnings unasked.
Anyhow, here is the changed warnings:
warnings <-
function (...)
{
if (!(n <- length(last.warning)))
2018 May 31
2
mysterious rounding digits output
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 want):
"?digits?: controls the number of digits to print when
printing numeric values."
On the face of it, printing the value "0,517" of 'ccc' looks
like printing 4
2018 May 31
0
mysterious rounding digits output
Hi Joshua,
Because there are no values in column ddd less than 1.
itemInfo[3,"ddd"]<-0.3645372
itemInfo
aaa bbb ccc ddd eee
skill 1.396 6.225 0.517 5.775 2.497
predict 1.326 5.230 0.462 5.116 -2.673
waiting 1.117 4.948 NA 0.365 NA
complex 1.237 4.170 0.220 4.713 5.642
novelty 1.054 4.005 0.442 4.260 2.076
creative 1.031 3.561 0.362 3.689
2018 Sep 18
2
Suggested Patch: Adding commas to list of packages after R CMD check
Dear R-devs,
Scenario:
When checking a package via `R CMD check package_tar.ball`, required / suggested packages may be missing. R subsequently returns a list of packages that are missing (delimited by spaces).
Example:
```
R CMD check glmSparseNet_0.99.13.tar.gz
* using log directory '/home/ubuntu/Bioconductor/glmSparseNet.Rcheck'
* using R Under development (unstable) (2018-06-06
2005 Apr 15
2
abbreviate or wrap dimname labels
For a variety of displays (mosaicplots, barplots, ...)
one often wants to either abbreviate or wrap long labels,
particularly when these are made up of several words.
In general, it would be nice to have a function,
abbreviate.or.wrap <-
function(x, maxlength=10, maxlines=2, split=" ") {
}
that would take a character vector or a list of vectors, x,
and try to abbreviate or wrap
2005 Nov 29
1
help combining mtext and strwrap?
Hi all,
I've got some image plots on which I'd like to include some gene information
(in the margins using mtext). Unfortunately, the description is rather long
and will need to be wrapped to fit on several lines. From what I know about
mtext, it's really only meant for single-line labels, not paragraphs.
Here's some sample code of the idea I'm trying to accomplish:
2009 Oct 19
1
How do I wrap a long mixed text/math expression in an axis label?
I would like to wrap a y-axis label onto two lines. My label is an expression
containing both text and math symbols. I have looked at plotmath,
strsplit(), strwrap(), deparse(), do.call(), substitute() and bquote().
Based on previous posts, I can get plain text to wrap. However, when I try
these methods on my label, the exact string is returned, rather than
evaluating the math symbols.
My
2005 Apr 14
3
Wrapping long labels in barplot(2)
I am using barplot, and barplot2 in the gregmisc bundle, in the
following way:
barplot2(sort(xtabs(expend / 1000 ~ theme)),
col = c(mdg7, mdg8, mdg3, mdg1), horiz = T, las = 1,
xlab = "$ '000", plot.grid = T)
The problem is that the values of 'theme', which is a factor, are in
some cases rather long, so that I would like to wrap/split them at a
space once they
2018 May 31
0
mysterious rounding digits output
>>>>> 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 want):
Since R 3.4.0 the help on ?options *does* say
2008 Oct 24
1
Automatically adjust text size in plot
Hi all,
I'm writing a function that will automatically generate a report based
on answers to a questionnaire. The exact questions and answers to the
questionnaire can vary. One of the question types is in a "matrix"
format, where the agreement to several statements can be indicated on
a scale.
I'm planning to plot this on a multilevel barplot, and only labeling
each "bar
2004 Dec 03
1
How to wrap or split labels on plot
Dear R gurus,
I want to wrap labels that are too long for a plot. I have looked at
strsplit(), substr(), nchar(), and strwrap(). I think it's some
combination but I'm having difficulty trying to figure out the right
combo. I think I need to create some new matrix containing the labels
already split, though I'm not sure if maybe there is a quick and dirty
way to address this
2010 Jul 13
2
Wrap column headers caption
Hi:
Using this dataframe with quite long column headers, how can I wrap the
text so that the columns are narrower. I was trying to use strwrap without
success. Thanks
reportDF <- structure(list(IDDate = c("3/12/2010", "3/13/2010", "3/14/2010",
"3/15/2010"), FirstRunoftheYear = c("33 (119 ? 119)", "n (0 ? 0)", "893 (110 ?
2010 Jan 28
1
hist - unevenly spaced bars
I am sure this is trivial, but I cannot solve it.
I make a histogram. There are 5 categories "1",...,"5" and 80 values and
the histogram does not evenly space the bars.
Bars "1" and "2" have no space between them and the rest are evenly spaced.
How can I get all bars evenly spaced?
The code:
> Q5
[1] "4" "4" "4"
2001 Oct 10
1
Spacing in the labels using xyplot()
We have a variable that we use to label bars in barplot() and to condition
on in xyplot(). Since the labels can be quite long, we use strwrap()
on-the-fly to split the strings into several "lines" separated by "\n". With
barplot, this works nicely using text(), but with xyplot() it doesn't. In
the latter, the labels appear to be "double-spaced" compared to the
2019 Apr 30
1
patch to improve matrix conformability error message
On Mon, Apr 29, 2019 at 06:28:46PM -0700, frederik at ofb.net wrote:
> I think this is a good idea. Is there a reason why it got no interest?
> Slippery slope?
What's the next step? Can it get committed?
> Or maybe others were also just occupied trying to figure out how
> Joshua's second message had timestamp earlier than his first message?
As a new subscriber, I guess my