Displaying 20 results from an estimated 600 matches similar to: "Wrap names.arg text in barplot"
2008 Oct 13
2
Subset based on items in a list.
R-help:
I have a variable ("ID_list") containing about 1800 unique numbers, and a
143066x29 data frame. One of the columns ("ID") in my data frame contains a
list of ids, many of which appear more than once. I'd like to find the
subset of my data frame for which "ID" matches one of the numbers in
"ID_list." I'm pretty sure I could write a function
2007 Mar 26
0
Sphericity and post-hoc analysis in a repeated-measure ANOVA
Does anyone have any suggestions for how to test for violation of the
sphericity assumption and apply the Huynh-Feldt correction to a
repeated-measure model? My model follows the format below:
Rep.anova=aov(Y~X1*X2+Error(Subject/(X1*X2),data=DataFile))
I've already looked at the explanations aov() and Error() in Baron's
“Notes on the use of R for psychology experiments and
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.
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
2011 Jun 15
1
Print the summary of a model to file
Hi there,
I am having a strange problem. I am running nls on some data.
#data
x <- -(1:100)/10
y <- 100 + 10 * (exp(-x / 2)
Using nls I fit an exponential model to this data and get a great fit
summary(fit)
Formula: wcorr ~ (Y0 + a * exp(m1 * -dist/100))
Parameters:
Estimate Std. Error t value Pr(>|t|)
Y0 -0.0001821 0.0002886 -0.631 0.528
a 0.1669675 0.0015223
2007 Mar 26
1
data-frame adding/deleting column
Hallo,
I have got an existing data frame and want to add a new column. The
existing data frame was created like this:
> df <- rbind( c("Fred", "Mary", 4), c("Fred", "Mary", 7),
+ c("Fred", "Mary", 9), c("Barney", "Liz", 3),
+ c("Barney", "Liz", 5) )
> df
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 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 ?
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)))
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
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
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
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
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:
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
2007 Aug 03
3
question about logistic models (AIC)
Een ingesloten tekst met niet-gespecificeerde tekenset is
van het bericht gescrubt ...
Naam: niet beschikbaar
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20070803/79b6292b/attachment.pl
2007 Oct 23
2
Plot a line according to a specified equation
Does anyone know how to graph a line according to a specified equation? I'd
like to plot the following hyperbola:
Y=139.35/(1+(0.174*X))
I know there's a way to do this, but I'm having a ridiculous time trying to
remember how.
Thanks!
Kyle H. Ambert
Department of Behavioral Neuroscience
Oregon Health & Science University
[[alternative HTML version deleted]]
2005 May 31
2
Barplot2 Title
Hello,
I would like to know if it's possible to modify the name of groups of bar because on my barplot2, I have 5 groups of bars and one of them is called "User Contributes" and when I save the plot "User contributes" is to big so I don't have it on my plot! Is it pssible to put the name vertically!
Thanks!
Sabine
---------------------------------
ils, photos
2005 Jul 26
3
text on some lines
Hi,
I would like to write text on 2 lines for example.
For example, if you have a long sentence and you want to cut it at the 45 caracter and put the continuation underneath!
Is it possible?
Thanks
Sabine
---------------------------------
[[alternative HTML version deleted]]