Displaying 20 results from an estimated 10000 matches similar to: "location of multi-line labels on barplots?"
2010 Jan 07
1
Barplot + plot same scale
Hello,
I would like to plot :
barplot(c(10,12,18))
and
plot(c(0,2,3), t="l")
and many other plots...
in a same scale. With par(new=T) it's not align, points are not in the
middle of the bar of barplot. Is there an easely solution to align that ?
Thank for you help,
G
[[alternative HTML version deleted]]
2001 Jul 10
4
accessing a table
Hi, all. I'm sure this is a simple question, but I'm having problems
figuring it out myself... I have a table:
> currenttable <- table(junk[-1],junk[-n])
> currenttable
bar foo junk
bar 2 2 0
foo 1 0 0
junk 0 0 1
and I'd like to know the result of the cell currenttable(bar,foo).
what is the best way to get that result?
thanks!
2001 Jul 09
3
transitions in R
Hi, All. I'd have a set of data in an array:
process <- c( 5 , 7 , 4 , 1 , 4 , 1 , 4 , 1 , 4 , 4 , 1 , 5 , 4 , ...)
and I'd like to know the number of transitions in this data. I
calculate transitions as the number of times a number follows another
number. thus, something like this would be a 1 deep transition:
1 --> 1 : 10% (and actual number of 1 --> 1 occurrences)
1
2002 May 19
3
How to shade part of a density plot
I'm trying to shade part of a density plot. The code I'm trying (using
the Old Faithful data as an example) is something like this:
# The Old Faithful geyser data
data(faithful)
d <- density(faithful$eruptions, bw = "sj")
plot(d)
polygon(d[d$x>4], col = "wheat")
I expected that the part of the curve to the right of 4 on the x axis
should be shaded, but nothing
2002 Oct 08
3
repeated measures help; disagreement with SPSS
Hi, all.
I have a simple design I'm comparing to output from SPSS.
the design is 1 repeated measure (session) and 1 between measure
(cond). my dependent measure is rl. here is the data I'm using (in a
data.frame):
mig <- data.frame(subj=factor(rep(subj,3)),
cond=factor(rep(cond,3)),
session=factor(c(rep(1,nsubj),rep(2,nsubj),rep(3,nsubj))),
2009 Aug 12
1
calling a function with dynamically generated buttons
Hallo,
I'm dynamically generating buttons depending on the number of rows of
my dataframe. Every button is supposed to call a function which
generates a plot with the values of one of my dataframe rows.
My code looks like this:
base <- tktoplevel()
plotten <- function(mat, namen, titel) {
midpts <- barplot(height=mat, names.arg = namen, main =
titel, las=2)
2010 Sep 10
1
adding labels above bars in a barplot
Hello,
I want to make a general routine to draw barplots with numbers plotted
above each bar. See the example below.
I could not place the numbers on the middle of each bar because I
could not calculate the right position of each x-axis tick. axTicks(1)
indicated a unitary step, but it does not seem work.
I appreciate any help or suggestions.
Best regards,
Antonio Olinto
2007 Mar 20
2
Ticks on barplots
Dear Gurus,
Using R 2.4.1 on Windows XP
I am generating stacked barplots of age-composition of fish populations
(Y) over time (X). As there are many years, not every bars is labeled.
When looking at the plot, it becomes difficult to associate labels with
their bars.
We have improved this a bit by using axis() to add a tickmark below each
bar. Can anyone suggest a way to draw ticks ONLY
2001 Apr 03
0
graph from unix into word
On 31 Mar 01,, R-help Digest wrote (re: R-help Digest V2 #380):
> Date: Fri, 30 Mar 2001 09:49:21 -0500 (EST)
> From: Greg Trafton <trafton at itd.nrl.navy.mil>
> Subject: [R] PICT output?
>
> hi, all. I use R on a unix (linux) box and am quite happy with it.
> However, sometimes I need to create a graph that needs to be used
with
> Microsoft Word or Powerpoint
2001 Apr 03
0
PICT output? R plot to word
On 3 Apr 01,, R-help Digest wrote (re: R-help Digest V2 #382):
> - ----- Original Message -----
> From: "Mark Myatt" <mark at myatt.demon.co.uk>
> To: "Greg Trafton" <trafton at itd.nrl.navy.mil>
> Cc: <r-help at stat.math.ethz.ch>
> Sent: Monday, April 02, 2001 9:31 PM
> Subject: Re: [R] PICT output?
>
> > > 2) Is there a way
2003 Mar 18
1
temperature profiles on maps
Hi, all. I'm looking for a way to generate temperature profiles and
display them in different colors on different maps. I'm basically
looking for a way to display simple meteorological graphs using
different color sets within R.
Is there a way to do that kind of thing in R?
failing that, is there any way to create temperature profiles in R?
thanks!
greg
2017 Dec 18
2
Finding center of mass in a hydrologic time series
Eric B's response provided just the kind of quick & simple solution I was
hoping for (appears as the function com below). However, I once again
failed to take advantage of the power of R and have reverted back to using
a for loop for the next step of the processing. The example below (which
requires the library EGRET for pulling an example dataset) works, but
probably can be replaced
2002 Feb 08
1
looping through lists...
Hi, all. I have a whole group of lists with things like this:
nw.1$cond (a string)
nw.1$RL (a vector of 10 values)
nw.1$IL (a vector of 10 values)
and I have lots of these lists:
nw.201
nw.202
nw.203
...
what I'd like to do is be able to get specific values from all these
lists (like the mean of $RL) for each indivividual list. I can
certainly do this manually
2004 Jul 21
2
RE: Comparison of correlation coefficients - Details
Dear all
I apologize for cross-posting, but first it is accepted custom to
thank the repliers and give a summary, and second I have still
the feeling that this problem might be a general statistical problem
and not necessarily related to microarrays only, but I might be wrong.
First, I want to thank Robert Gentleman, Mark Kimpel and Mark Reiners
for their kind replies. Robert Gentleman kindly
2017 Dec 18
0
Finding center of mass in a hydrologic time series
Hi Eric,
the following works for me.
HTH,
Eric
library(EGRET)
StartDate <- "1990-10-01"
EndDate <- "2017-09-30"
siteNumber <- "10310000"
QParameterCd <- "00060"
Daily <- readNWISDaily(siteNumber, QParameterCd, StartDate, EndDate)
# Define 'center of mass' function
com <- function(x) {
match(TRUE, cumsum(x/sum(x)) > 0.5) -
2012 Feb 11
0
How to solve long tick labels (axis.text.x)
Hi, all,
I am a newbie for [r].
I am currently trying to learn this example.
/http://learnr.wordpress.com/2009/03/17/ggplot2-barplots//
/http://learnr.wordpress.com/2009/03/17/ggplot2-barplots/ /
After I made a drawing
/c <- b + facet_grid(Region ~ .) + opts(legend.position = "none") /
If I want to make the axis.text.x (I don't want to mix with axis labels, so
I type
2018 Jul 29
2
odd behavior of names
Bugzilla issue 16101 describes another first-list-name-printed-differently
oddity
with the Windows GUI version of R:
> a <- "One is \u043E\u0434\u0438\u043D\nTwo is \u0434\u0432\u0430\n"
> Encoding(a) # expect "UTF-8"
[1] "UTF-8"
> sapply(strsplit(a, "\n")[[1]], charToRaw)[c(1,1,2)]
$`One is ????`
[1] 4f 6e 65 20 69 73 20 d0 be d0 b4 d0
[13] b8
2001 Mar 30
5
PICT output?
hi, all. I use R on a unix (linux) box and am quite happy with it.
However, sometimes I need to create a graph that needs to be used with
Microsoft Word or Powerpoint (ug). I can create a png or jpeg format
picture, but the text look pretty crummy because jpeg is bitmapped. I
can also create a PS/EPS version (my preference), but then it doesn't
display properly in word or powerpoint (but it
2003 Nov 07
1
barplot(names.arg) versus axis(labels)
Should I be able to use axis() on a barplot? i have a data.frame, the first
3 values of which are:
> c[1:3,]
median mean
A1 56.5 58.50000
A61 73.0 73.00000
A62 63.0 63.00000
> str(c)
`data.frame': 19 obs. of 2 variables:
$ median: num 56.5 73 63 161 51 55 44.5 22 54 49 ...
$ mean : num 58.5 73.0 63.0 161.0 47.5 ...
if I do barplot(median) and then try
2006 Feb 21
2
rotated labels in barplot with beside=T and multiple groups
I have a data set that I display using barplot. I don't know what you
call it, but when I look at it, it looks like this:
> lsu
(0,0.1] (0.1,0.2] (0.2,0.3] (0.3,0.4] (0.4,0.5] (0.5,0.6]
A 0.052631579 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000
B 0.000000000 0.000000000 0.001007049 0.003021148 0.000000000 0.000000000
E 0.200000000 0.000000000