Displaying 20 results from an estimated 2000 matches similar to: "Text wrap"
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
2010 Apr 25
1
Manipulating text files
Dear R Community,
I am trying to optimize a water quality model that I am using. Based on conversations with others more familiar with what I am doing I plan to implement DEOptim to do this. The water quality model is interfaced through a GUI. I have the input file necessary to alter parameters and run the model as a text file.
To do the optimization I have figured out the general procedure
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
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 ?
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
2011 Apr 20
3
succession time series graph
Dear gracious R community,
I would like to produce charts of phytoplankton biomass changes
through time. Each species has a line, and the biomass varies in
mirror form along the line for each species along the X time axis.
Here is an example of what I'd like to do:
http://www.er.uqam.ca/nobel/r30240/Succession.jpg
Any suggestions?
Thanks
David Bird
UQAM, Montreal
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
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
2011 Nov 01
3
Greek letter
Hi everyone.
I'm trying to use small letter phi in a graph produced in R. However, the
small letter phi does not look as it should.
In fact, it looks like this:
http://r.789695.n4.nabble.com/file/n3963311/Untitled.png
instead of what is here http://en.wikipedia.org/wiki/Phi
Here's the code I use:
expression(phi [1])
Anyone has an idea?
With regards,
Phil
--
View this message
2012 Nov 28
0
str(..., strict.width="wrap") changes alignment of colons
Hi,
This was surprising to me and does not appear to be documented in
?str. After reading ?strwrap, I see that the problem is that
"Whitespace ... in the input is destroyed". However, I thought I'd
mention it because I'm not sure it is intended behavior for str().
I have a list, and the names of the list have a variable number of characters.
> x <- list(A=1:10,
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 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
2012 Apr 27
1
Wrap names.arg text in barplot
Hello!
Does anyone know of a handy way to wrap the names.arg text in a barplot?
I'm creating a bar plot with rather long labels; I can adjust the margins,
but I'd also like to have the text wrap to about 4cm. Thanks!
Kyle H. Ambert
Doctoral Candidate, Bioinformatics
Oregon Health & Science University
ambertk@gmail.com
[[alternative HTML version deleted]]
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:
2012 Sep 08
1
Thanks for helping - back to the community?
DeaR R-fellows,
I got a lot of help from you concerning the generation of heat maps,
so I was able to write and work with a script for this purpose at
last. Some visitors of our Ecological Station asked about the
generation of the graphs and so I decided to write down a small
description.
Is it adviseable to publish the link to the article in an R-wiki
(which?) so I can give back a little to the
2012 Sep 09
1
PCA legend outside of PCA plot
Hi All,
I have been trying to get to plot my PCA legend outside of the PCA plot,
but success still alludes me.
Can you guys please advise how I can achieve this. I used locater() to
obtain coordinates for below the Comp.1 axis. Using these coordinates the
legend disappears.
Below is the code for the PCA and legend.
Thanks in advance for the help.
Regards
Tinus
r.cols <-
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
2009 Apr 29
3
how to word-wrap text in labels in plots?
c <- structure(c(2L, 2L, 1L, 3L, 4L, 2L, 3L, 2L, 3L, 2L, 5L), .Label = c("foo",
+ "bar", "a really really long variable label mostly here to show the need of word-wrapping text in labels",
+ "a not so important value", "baz"), class = "factor")
plot(c)
Is there a way to get the long variable labels to automatically wrap so that all
2009 Aug 25
2
allowing line wrap for long strip text in xyplot (lattice)
Hi. Am brand new to R and to mailing lists - have never posted anywhere
before, so hope I do this right.
Am using R 2.9.1 with lattice graphics (just installed, fully up to date).
Am doing trellis xyplot with y (emp=employment), x (yearmo=a time measure)
and conditioning variable (indf - factor describing industry) -- i.e., (emp
~ yearmo | indf), where all three variables are in a dataframe. The
2014 Sep 16
1
Changepoint analysis--is it possible to attribute changpoints to explanatory variables?
Hello,
I would like to evaluate the relationship between flows and phytoplankton abundance (or Chlorophyll a concentrations) using a changepoint analysis.? Specifically, I have two study questions:
Study Question 1: Are there certain flow thresholds that result in spikes in phytoplankton abundance?
Study Question 2: Are the duration of certain flows important for phytoplankton abundance (e.g.,