Displaying 20 results from an estimated 500 matches similar to: "ggplot questions"
2008 May 06
2
list manipulation
Hello,
I have a set of one-liners (many thanks to previous responses from this
list) that I use to look at newly imported data sets with functions like
dim(), names(), str(), etc. within lapply(). Generally, these commands
work for me but, I am apparently still missing some aspect of list
manipulation. I don't understand why I get a set of NULL list elements
at the end of each output as
2008 Dec 09
2
assign()ing within apply
Hello,
I'm trying to convert a character column in several dataframes to lower
case.
###
#
# Sample data and 'spp' column summaries:
# dput(ban.ovs.1993[sample(row.names(ban.ovs.1993), 20), 1:4])
ban.ovs.93 <- structure(list(oplt = c(43L, 43L, 38L, 26L, 35L, 8L, 39L,
1L,
34L, 50L, 10L, 29L, 31L, 24L, 18L, 12L, 27L, 49L, 28L, 51L),
rplt = c(NA_integer_, NA_integer_,
2008 Feb 08
1
Can I index a dataframe with a reference from/to a second dataframe?
Hello,
I am unable to figure out how to code a new column in a data frame based
on an existing column that matches a column in a reference data frame,
in a relational-db fashion. I would like this to maintain a minimum set
of reference tables that may be reused over several similar datasets.
Specifically, I have two data frames as listed below, 'Bos' and 'tree.'
For each case in
2008 Apr 04
0
ggplot2 - version 0.6
ggplot2 ------------------------------------------------------------
ggplot2 is a plotting system for R, based on the grammar of graphics,
which tries to take the good parts of base and lattice graphics and
avoid bad parts. It takes care of many of the fiddly details
that make plotting a hassle (like drawing legends) as well as
providing a powerful model of graphics that makes it easy to produce
2008 Apr 04
0
ggplot2 - version 0.6
ggplot2 ------------------------------------------------------------
ggplot2 is a plotting system for R, based on the grammar of graphics,
which tries to take the good parts of base and lattice graphics and
avoid bad parts. It takes care of many of the fiddly details
that make plotting a hassle (like drawing legends) as well as
providing a powerful model of graphics that makes it easy to produce
2008 Jan 09
0
formating ftable
Hi all,
I am using ftable and xtabs to get total counts of species per location per hight category (understory, midstory and overstory). i can save the data in almost the format i would like it to be - but not quite. Here it is an example of what i get:
x - is a dataframe with the following columns: LocationID, Species, PercentCover, Category
where Category tells if the Species belongs to
2008 Jan 10
0
formatting ftable
Hi all, I am using ftable and xtabs to get total counts of species per location per hight category (understory, midstory and overstory). i can save the data in almost the format i would like it to be - but not quite. Here it is an example of what i get: x - is a dataframe with the following columns: LocationID, Species, PercentCover, Categorywhere Category tells if the Species belongs to
2008 Oct 09
1
YALAQ - Yet Another LApply Question
Hello,
Two lapply questions (system info and sample data below):
1) Why does the first form of command1 add the name of y _after_ the
str() output rather than before as does the second (preferred) form?
# command1 version1
invisible(lapply(ls(pattern='bn'), function(y) cat(y, "\n",
str(get(y)), "\n") ))
# command1 version2 (preferred output)
2009 Dec 04
2
[ggplot2] Wind rose orientation
Aloha all,
I love using ggplot. It took a while to get used to the grammar of
graphics, but it is starting to get easy now that I am thinking in a
more structured way.
A question. I'm making a wind rose that I'd like to be oriented with
due north straight up. I've discovered that the orientation is
sensitive to how north is represented. When north is represented as
0,
2012 Jan 03
4
Changing X axis of ggplot
Thanks to Joshua Wiley for turning me on to ggplot2.
I am making a plot using this:
p <- ggplot(dallas, aes(x = offense_hour)) + geom_bar() + coord_polar()
Dallas is a data frame, and offense_hour is a column with chron
objects from the chron library. In this case, the chron object was
created with the times function. It is only a time (H:M:S) with no
date attached.
The plot shows up fine,
2012 Mar 12
1
ggplot2: coord_polar
Hello HelpeRs,
The last print statement in the code segment below results in :
Error in data$x[data$x == -Inf] <- range$x.range[1] :
replacement has length zero
R version 2.14.1 Patched (2011-12-23 r57982)
ggplot2: version 0.90
OS : Linux (64bit)
Any thoughts?
Many Thanks,
A.
## code segment starts here
df <- data.frame(
trt = factor(c(1, 1, 2, 2)),
resp = c(1, 5,
2008 Feb 08
1
Point pattern - Surface pattern statistical link
Hi,
I am a graduate student at the University of Maine in forestry. I am
studying spatial pattern analysis of tree regeneration. My study design is
a contiguous grid in which regeneration is completely sampled, and hopefully
analyzed using surface pattern techniques. I am also interested in
examining the relationship of the regeneration density with overstory trees,
which have a GPS location,
2012 Feb 29
1
ggplot2 dot chart-start at zero
I am trying to create a simple dot-plot in ggplot2 with a solid line from the y-axis to the dot, something I first saw in Cleveland's 1984 book
What I would like is to have the graph start at zero on the x-axis but leave some space on the right side of the plot area.
I assumed that I should be able to do this with expand() in scale_x_continuous() but either I'm wrong or just don't
2009 Jan 24
2
ggplot2 - how to change location / position of wind rose axis labels?
Dear R users,
First just want to say thank you to all for developing such a wonderful
software and packages.
I need to produce a wind rose plot. Tried with packages circular and plotrix
and couldn't quite get what I want. Moved to package ggplot2 and it's going
great. However stuck in how to move axis labels.
I am using the wind rose from the help to learn how to do what I need (code
2013 Mar 15
0
ggplot2, arrows and polar coordinates
Dear R users,
The following issue has been already documented, but, if I am not
mistaken, not yet solved.
This issue appears while trying to plot arrows with "geom_segment"
(package ggplot2), with polar coordinates ("coord_polar"). The direction
of some arrows is wrong (red rectangle). Please find herewith an example.
Does someone know how to deal with that issue?
Best
2008 May 12
1
Converting qqplot2 qplot() to grammar?
Hello all,
I've been using the following qplot command:
qplot(pixX,pixY, data=som, geom="tile", fill=rgb) +
scale_fill_identity() + opts(aspect.ratio = .75) + facet_grid(unitX ~ unitY)
Now I would like to convert it into the explicit ggplot grammar, so I
can remove the extras: axes, labels, background, borders, facet labels,
and extra white-space around the plot. (If anyone has
2010 Jul 07
0
ggplot2 version 0.8.8
ggplot2 ------------------------------------------------------------
ggplot2 is a plotting system for R, based on the grammar of graphics,
which tries to take the good parts of base and lattice graphics and
avoid bad parts. It takes care of many of the fiddly details
that make plotting a hassle (like drawing legends) as well as
providing a powerful model of graphics that makes it easy to produce
2010 Jul 07
0
ggplot2 version 0.8.8
ggplot2 ------------------------------------------------------------
ggplot2 is a plotting system for R, based on the grammar of graphics,
which tries to take the good parts of base and lattice graphics and
avoid bad parts. It takes care of many of the fiddly details
that make plotting a hassle (like drawing legends) as well as
providing a powerful model of graphics that makes it easy to produce
2010 Mar 09
1
ggplot2 rose diagram
Dear R gurus -
consider this plot:
library(ggplot2)
dat <- sample(1:8,100,replace=TRUE)
smp <- ggplot(data.frame(dat), aes(x=factor(dat),fill=factor(dat))) + geom_bar(width=1)
smp + coord_polar()
Q1. How do I change the font size and weight of bar labels (1,2,3...)? I've been wallowing in the 'Themes' structure and I just can't figure out the correct place to change
2009 Nov 14
2
formatting dates in axis labels (ggplot2)
I'm having trouble figuring out how to format Date variables when used
as axis labels in graphs.
The particular case here is an attempt to re-create Nightingale's
coxcomb graph with ggplot2,
where I'd like the months to be labeled as "Mar 1885", "Apr 1885", using
a date format
of "%b %Y" applied to label the dates, or really anything other than