to release that
version?
On Thu, Apr 15, 2010 at 9:09 AM, hadley wickham h.wick...@gmail.com wrote:
On Thu, Apr 15, 2010 at 1:16 AM, Chuck vijay.n...@gmail.com wrote:
Depending on the size of the dataframe and the operations you are
trying to perform, aggregate or ddply may be better
Other then rebuilding the plots, is there any way either (1) to combine
existing ggplot2 plots or (2) to extract a layer from an existing plot
so that it can be added to another?
Not really, although you can always pull apart the plot components.
Can you give an example of what you are trying
bar.err (agricolae)
plotCI (gplots)
xYplot (Hmisc)
error.bars (psych)
dispersion (plotrix)
plotCI (plotrix)
Not to mention: http://biostat.mc.vanderbilt.edu/wiki/Main/DynamitePlots
Hadley
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
df - data.frame(a = a\b, v = 4, z = this is Z)
write.csv(df, test.csv, row.names = FALSE, quote = FALSE)
read.csv(test.csv, quote = )
Unfortunately my real example is more like:
df - data.frame(a = a\b, v = 4, z = this is: A, B, C)
so quote = F won't work.
Can write.table and read.table
Can write.table and read.table really be so asymmetric?
write() is a wrapper for cat() and read() is a wrapper for scan() so the
question should really be can cat() and scan() be so asymmetric. Looking at
their help pages, I would say that at least some degree of asymmetry is
plausible.
On Thu, Apr 8, 2010 at 8:20 AM, jim holtman jholt...@gmail.com wrote:
You were using read.csv and not read.table. The following seems to work
with using a separator that will probably not appear in the text:
df - data.frame(a = a\b, v = 4, z = this is: A, B, C)
write.table(df, test.csv,
Remove the comma and count.fields gives 11 for all rows.
From your other post(s) on escaped quotes, I assume that
this won't solve your problem with the existing files. (:
Right - but assuming I'm not crazy, that should cause an error in
read.csv, right? It shouldn't just parse the file
Because of the way you've constructed the plot with qplot, you need to use:
myPlot + geom_point(
data=medians,
aes(x=med,shape=cut, y=0),
size=2.5,
)
Hadley
On Wed, Apr 7, 2010 at 5:11 AM, Johannes Graumann
johannes_graum...@web.de wrote:
Hi,
Please consider the example below. How can I
df - data.frame(a = a\b)
write.table(df, test.csv, sep = ,, row = F)
Is there any to load test.csv into R correctly? I've tried the following:
read.table(test.csv, sep = ,)
[1] V1
0 rows (or 0-length row.names)
Warning message:
In read.table(test.csv, sep = ,) :
incomplete final line found
url - http://dl.dropbox.com/u/41902/22240.csv;
read.csv(url)[, 1]
[1] oppose NAoppose support
read.csv(url, header = F)[, 1]
[1] url
[2] http://maplight.org/us-congress/bill/109-hr-5825/387248;
[3] http://maplight.org/us-congress/bill/110-hr-3546/378743;
[4]
Also I have seen 5,000 page listings in SAS.
Is this a pro or a con?
Hadley
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/
__
R-help@r-project.org mailing list
On Thu, Apr 1, 2010 at 3:05 AM, Peter Dalgaard pda...@gmail.com wrote:
Jeff Brown wrote:
Sorry for spamming. I swear I had worked on that problem a long time before
posting.
But I just figured it out: I have to change the values, which are
represented as integers, not strings. So the
Incidentally, there is nothing new or radical in this; indeed, John Tukey,
Leo Breiman, George Box, and others wrote eloquently about this decades ago.
And Breiman's random forest modeling procedure explicitly abandoned efforts
to build simply interpretable models (from which one might infer
On Wed, Mar 31, 2010 at 8:20 AM, Tony B tony.bre...@googlemail.com wrote:
Dear all,
Lets say I have the following:
x - c(Eve: Going to try something new today..., Adam: Hey @Eve, how are
you finding R? #rstats, Eve: @Adam, It's awesome, so much better at
statistics that #Excel ever was!
# Set up the ratio variables
system.time({
temp - cbind(data, do.call(cbind, lapply(names(data)[3:4], function(.x)
{
unlist(by(data, data$group, function(.y) .y[,.x] /
max(.y[,.x])))
})))
colnames(temp)[5:6] - paste(colnames(data)[3:4], 'ind.to.max', sep =
exp1^(a[case] * l * 10)
would be better written out of the loop as
b - exp1^(a * l * 10)
And even better as
b - exp(a * l * 10)
Hadley
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/
On Wed, Mar 24, 2010 at 8:52 AM, mgierdal mgier...@gmail.com wrote:
I have a dataFrame variable:
L1 L2 L3 ... v1 v2 ...
1
2
3
4
...
I want to process subsets of it as defined by combinations of L1-L2-L3. I do
it successfully using nested loops:
for (i in valuesOfL1 {
for
See here:
http://learnr.wordpress.com/2010/03/23/ggplot2-changing-the-default-order-of-legend-labels-and-stacking-of-data/
Hadley
On Wed, Mar 24, 2010 at 2:40 PM, Ryan Garner
ryan.steven.gar...@gmail.com wrote:
How do I reverse the order of the legend in a bar plot to match order of the
Hi all,
Does any one know of any encryption/decryption algorithms in R? I'm
not looking for anything robust - I want some way of printing output
to the screen that the user can't read immediately, but can decrypt a
little later. The main thing I don't want to the user to see is a
number, so
On Fri, Mar 19, 2010 at 12:35 PM, Barry Rowlingson
b.rowling...@lancaster.ac.uk wrote:
On Fri, Mar 19, 2010 at 5:10 PM, Barry Rowlingson
b.rowling...@lancaster.ac.uk wrote:
On Fri, Mar 19, 2010 at 5:00 PM, Hadley Wickham had...@rice.edu wrote:
Hi all,
Does any one know of any encryption
Does anyone have any experience retrieving latitutde and longitude for
an address from the Google Maps API?
This thread from r-sig-geo may be of interest:
https://stat.ethz.ch/pipermail/r-sig-geo/2010-March/thread.html#7788
In particularly, note that what you are doing is against the google
Based on a discussion found on the R mailing list but dating back to 2008, I
have compared the log-likelihoods of the glm model and of the glmer model as
follows:
lrt - function (obj1, obj2){
L0 - logLik(obj1)
L1 - logLik(obj2)
L01 - as.vector(- 2 * (L0 - L1))
df - attr(L1, df) -
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
to the
square-roots of the number of observations in the groups.
I find this option often very useful.
Thanks for any insight into how to achieve this with geom_boxplot.
Joh
On Wednesday 10 March 2010 16:12:49 hadley wickham wrote:
What is varwidth?
Hadley
On Wed, Mar 10, 2010 at 1:55 PM
For Q2 you can use opts(legend.position = c(0.9, 0.9)).
For Q3, you can also use scale_y_sqrt().
Hadley
On Wed, Mar 10, 2010 at 2:05 PM, Tim Howard tghow...@gw.dec.state.ny.us wrote:
To answer two of my own questions to get them into the archives (I am slowly
getting the hang of ggplot):
By Q2 I was trying to refer to the Y-axis labels. For the polar plot, the
Y-axis labels reside left of the panel. I was looking for a way to get the
Y-axis labels to radiate out from the center so it would be clear which line
each label refers to. I still can't find any reference to moving
Run that function hourly with plyr
output.hourly - dlply(df.i1,tshour,cor.dat)
Why not
output.hourly - ddply(df.i1,tshour,cor.dat)
? Generally you want to work with data frames in R, if at all possible.
Hadley
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics
The basic reason because apply works with matrices - it first turns
the input into a matrix, processes each column and then returns a
matrix. See colwise in the plyr package for a function that works
column wise on a data frame, returning a data frame.
Hadley
On Sun, Mar 7, 2010 at 11:07 AM,
Hi Mark,
If efficiency is a concern you might want to read Computing Thousands
of Test Statistics Simultaneously in R by Holger Schwender and Tina
Müller, http://stat-computing.org/newsletter/issues/scgn-18-1.pdf.
If you just want to do it, see the examples in
please
On Sun, Mar 7, 2010 at 2:08 PM, hadley wickham h.wick...@gmail.com wrote:
Hi Mark,
If efficiency is a concern you might want to read Computing Thousands
of Test Statistics Simultaneously in R by Holger Schwender and Tina
Müller, http://stat-computing.org/newsletter/issues/scgn-18-1
One of the things about R which many (and that certainly includes
me) have to find out the hard way is that you have to *learn*
what to expect! You can't just import it from prior experience in
other contexts. So, by the time you have learned that a matrix
is such that all its elements must
Suppose X is a dataframe or a matrix. What would you expect to get from
X[1]? What about as.vector(X), or as.numeric(X)?
The point is that a dataframe is a list, and a matrix isn't. If users don't
understand that, then they'll be confused somewhere. Making matrices more
list-like in one
Hi David,
That's the behaviour I'd expect - the plot is 5 x 13000. What were
you expecting?
Hadley
On Fri, Feb 26, 2010 at 8:06 AM, David Hajage dhajag...@gmail.com wrote:
Hello,
I think there is a bug in coord_equal when x s a factor :
ggplot(diamonds, aes(clarity, fill=cut)) +
Try: stats:::R_pansari
Hadley
On Wed, Feb 24, 2010 at 7:55 PM, Dale Steele dale.w.ste...@gmail.com wrote:
Thanks, when I modify the function as I think you suggest, I get the
following error:
qansari - function(p, m, n) {
.C(R_qansari, as.integer(length(p)), q =
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
Hi Doug,
Could you please provide a reproducible example? It's difficult to
diagnose the problem without one.
Hadley
On Fri, Feb 12, 2010 at 2:46 PM, DougNiu d...@umn.edu wrote:
Hi there:
I am new to R and creating a boxplot panel chart to show a test result.
I have four output variables
I, personally, utilize the ifelse(test,statement,statement) function when
possible over the methodology outlined.
if + else and ifelse perform quite different tasks, and in general can
not (and should not) be exchanged. In particular, note that for
ifelse, the class attribute of the result is
Hi Dimitri,
Have you looked at the examples for scale_x_date -
http://had.co.nz/ggplot2/scale_date.html? They show you how to both
set the limits and control the labels.
Hadley
On Sun, Feb 14, 2010 at 1:34 PM, Dimitri Shvorob
dimitri.shvo...@gmail.com wrote:
... Unfortunately, a problem
Without a reproducible example, it's impossible to give you any more
suggestions.
Hadley
On Mon, Feb 15, 2010 at 2:16 PM, Dimitri Shvorob
dimitri.shvo...@gmail.com wrote:
Trying
+ scale_x_date(format = %b)
produces a peculiar result: Apr and Dec facets are labeled Jan, remaining
labels
Hi Paul,
That's a bug in the current version of ggplot. I'm working on update
for later this week.
Hadley
On Mon, Feb 8, 2010 at 5:56 PM, Paul Sutcliffe psutc...@it.uts.edu.au wrote:
In ggplot2 how do you justify the legend text ?
In the example below the opts(legend.text = theme_text(size
I was looking for a fast line counter as well a while ago and ended up
writing a small function in R:
countLines() in the R.utils package
At least at the time, it was faster than readLines() [for unknown
reasons]. It is also more memory efficient. It supports connections.
I don't think
Hi Liam,
Your syntax is a little off. You want:
p - ggplot2(~, aes(x = ~, y = ~, colour = Type)) +
geom_area(aes(fill = Type), position = 'stack')
Position isn't an aesthetic.
Hadley
On Sun, Feb 7, 2010 at 10:40 PM, Liam Blanckenberg
liam.blanckenb...@gmail.com wrote:
Hi all,
I have
only a line for each (stacked) Type's
value...
I hope this is somewhat clear!
Many thanks,
Liam
On Wed, Feb 10, 2010 at 1:53 AM, hadley wickham h.wick...@gmail.com wrote:
Hi Liam,
Your syntax is a little off. You want:
p - ggplot2(~, aes(x = ~, y = ~, colour = Type
Hi all,
Is there a fast way to determine the number of lines in a file? I'm
looking for something like count.lines analogous to count.fields.
Hadley
--
http://had.co.nz/
__
R-help@r-project.org mailing list
parser::nlines does it in C.
Looks promising, but I need something that uses connections because
I'm working with big bzipped files.
Hadley
--
http://had.co.nz/
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
Hi Ken,
How about something like
length(readLines(fname))
I'm trying to avoid the overhead of reading the file in twice. (I'm
trying to preallocate a data structure for a chunked read)
Hadley
--
http://had.co.nz/
__
R-help@r-project.org mailing
On Sun, Feb 7, 2010 at 11:32 AM, Jacob Wegelin jacobwege...@fastmail.fm wrote:
The example below creates parallel time-series plots of three different y
variables conditioned by a dichotomous factor. In the graphical layout,
• Each y variable inhabits its own row and is plotted
Hi Titus,
The latest version of reshape is 0.8.3 - perhaps upgrading will fix
your problem.
Hadley
On Sat, Feb 6, 2010 at 4:51 AM, Titus von der Malsburg
malsb...@gmail.com wrote:
Hi list,
I run R on Linux and OSX. On both systems I use R version 2.9.2 (2009-08-24)
and reshape version:
On Fri, Feb 5, 2010 at 9:29 AM, jim holtman jholt...@gmail.com wrote:
Does this help:
x -
c(1234567.z3.abcdef-gh.12,1234567.z3.abcdef-gh.12,1234567.z3.abcdef-gh.12)
y - strsplit(x, '[.]')
Here's another way with the stringr package:
library(stringr)
x -
Really? Where exactly is the loophole in 'If the question relates to a
contributed package ... try contacting the package maintainer first.'?
How about the general R philosophy that if you dare to mistakenly
submit a bug report that turns out to be a feature, not a bug, you
shall be well and
On Wed, Feb 3, 2010 at 11:06 AM, David Freedman 3.14da...@gmail.com wrote:
also,
library(plyr)
ddply(d,~grp,function(df) weighted.mean(df$x,df$w))
Or
ddply(d, grp, summarise, mean = weighted.mean(x, w))
which is convenient if you want more than one output
Hadley
--
http://had.co.nz/
It will of necessity be slower (because there's more machinery underlying
the sqldf package); but I doubt whether it would be noticeably slower than
the native R solution in most practical situations. The same would be true
for plyR's implementation (it relies on the proto package, which slows
Hi Thomas,
Please provide a reproducible example. The most likely explanation is
that after loading your data you haven't converted your date
variable from a factor into a real date.
Hadley
On Wed, Feb 3, 2010 at 1:15 PM, Thomas Adams thomas.ad...@noaa.gov wrote:
All:
I am using the
The ddply invocation would look like so:
R my - ddply(iris, .(w=Sepal.Length 5.5, Species), transform,
grmean=mean(Petal.Width))
R head(my)
w Sepal.Length Sepal.Width Petal.Length Petal.Width Species
grmean
1 FALSE 5.8 4.0 1.2 0.2 setosa
On Sun, Jan 31, 2010 at 5:05 PM, Sunny Srivastava
research.b...@gmail.com wrote:
Dear R-Helpers,
I have a data.frame (df) and the head of data.frame looks like
ProbeUID ControlType ProbeName GeneName SystematicName
1665 1577 0 pSysX_50_22_1 pSysX_50 pSysX_50
5422
Hi Chuck,
It looks like a scoping bug in spmx to me:
f - function() {
x - data[data$id==111,]
print(spm(x$value ~ f(1:nrow(x
}
f()
I'd suggest you contact the package maintainer directly.
Hadley
On Fri, Jan 29, 2010 at 1:34 PM, Chuck White chuckwhi...@charter.net wrote:
Hello -- I
Hi Dieter,
It looks like a bug:
Order works fine with bars:
qplot(factor(dur),weight=p,data=cf1, fill=score, geom = bar, order =
rev(score))
but not with areas:
qplot(dur, p, data=cf1, fill=score, geom = area, order = rev(score))
I'll add it to my to do list.
Hadley
On Tue, Jan 26, 2010 at
can you also reproduce the “triangles” problem? Is it just a trivial
corollary of the order-bug?
The triangles are there because you have a layer of points (from the
qplot default) and layer of areas. Setting geom = area in qplot
fixes that.
Hadley
--
http://had.co.nz/
In case you have a temporary workaround, it would be nice to have it. It’s a
show stopper for my report. Bars are not an option, because the curve looks
too jaggy.
I just remember that to work around the problem, you can just manually
order the data frame:
cf1 - cf1[with(cf1, order(dur,
On Mon, Jan 25, 2010 at 4:43 AM, Paul Hiemstra p.hiems...@geo.uu.nl wrote:
Brad Patrick Schneid wrote:
### The following is very helpful # listOfFiles -
list.files(pattern= .txt) d - do.call(rbind, lapply(listOfFiles,
read.table)) ###
but what if each
On Wed, Jan 20, 2010 at 4:37 PM, Dimitri Liakhovitski ld7...@gmail.com wrote:
Hello!
I have a data frame with a factor and a numeric variable:
x-data.frame(factor=c(b,b,d,d,e,e),values=c(1,2,10,20,100,200))
For each level of factor - I would like to divide each value of
values by the mean
Note that in the documentaton ?[.data.table where I say that 'by' is slow,
I mean relative to how fast it could be. Its seems, in this specific
example anyway, and with the code posted so far, to be significantly faster
than sqldf and plyr.
Of course the best of both worlds would be to use
On Wed, Jan 20, 2010 at 8:43 AM, Matthew Dowle mdo...@mdowle.plus.com wrote:
Sounds like a good idea. Would it be possible to give an example of how to
combine plyr with data.table, and why that is better than a data.table only
solution ?
Well, ideally, you'd do:
adt - data.table(a)
ans2 -
On Mon, Jan 18, 2010 at 1:54 PM, Bert Gunter gunter.ber...@gene.com wrote:
One way to do it:
1. Convert your date column to the Date class using the as.Date() function.
This allows you to do the necessary arithmetic on the dates below.
dt - as.Date(a[,4],%d/%m/%Y)
2. Create a factor out of
If you can point me towards a doc that explains this in simple terms I
would be obliged. Don't expect you to have to provide the answer.
Any of the introductory texts should explain the various forms of indexing
and the use of the apply family of functions. They are both central to
effective
Ouch! Hmmm. From the Value section of the apply docs... If each call
to FUN returns a vector of length n, then apply returns an array of
dimension c(n, dim(X)[MARGIN]) if n 1. Since I set MARGIN to 1, then I
was operating on rows where n is 3.
c(n, dim(X)[MARGIN])
[1] 3 2
How about
On Fri, Jan 15, 2010 at 5:30 PM, Janko Thyson
janko.thy...@ku-eichstaett.de wrote:
Dear List,
I am not really familiar with any other language than R, but I’ve heard that
in other languages there is something called “self referencing”.
Here’s what I’m trying to get an answer for:
Suppose
I see. Well, I never lacked any of these capabilities... Please understand
that people who use R to do their work may have different objectives than the
developers - and they form the majority of R users.
Well how about a documentation system that could look back over your
history and notice
Dear list,
Many people seem unhappy with the new documentation server because you
need to have R running to access it, and it's not immediately obvious
how to bookmark references so they work long-term. One solution to
this problem is to have a globally available website that provides
access to
Many people seem unhappy with the new documentation server because you
need to have R running to access it, and it's not immediately obvious
how to bookmark references so they work long-term. One solution to
this problem is to have a globally available website that provides
access to all
http://pledgie.com/campaigns/7707 - here you can donate as much or as
little as you like to support this project. You won't pay until the
total amount has been pledged.
I misread the documentation - do you actually pay right away. If I
don't reach the $1000, I'll pass on the money to a good
:
dput(l)
list(structure(c(0.182198327359618, 0.473715651135006, 0.29689366786141,
0.0471923536439665), .Dim = c(1L, 4L), .Dimnames = list(f5_9,
c((0.5,1.5], (1.5,2.5], (2.5,3.5], (3.5,4.5]
Mark
Am 06.01.2010 um 15:48 schrieb hadley wickham:
Hi Mark,
Could you send a the results
What I'd really like is for someone who has good taste to redesign the look
of the whole system. I think one or two people are working on packages to
do this, and I'd much rather spend time providing whatever low level support
they need, rather than doing it myself.
Have you looked at adding
I have to close all the tabs and call help to open them
again. Also, the R-supplied java tool for searching help is ancient and
underwhelming.
Then contribute a new one.
And this would be pretty easy to, since you can program it in R.
There are heaps of possibilities - you could use do
Hi Mark,
Could you send a the results of dput(l)? It will make exploration easier.
Hadley
On Wed, Jan 6, 2010 at 8:07 AM, Mark Heckmann mark.heckm...@gmx.de wrote:
Hi,
I have an issue concerning plyr.
I have a list l as output from dlply.
l
$`1`
(0.5,1.5] (1.5,2.5] (2.5,3.5]
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
I hope I have missed a better way to do this in R. Otherwise, I
believe what I'm after is some kind of C or C++ macro expansion,
because the number of loops should not be hard coded.
Why not generate the list of integers that sum to 17, and then mix
with 0s as appropriate?
Hadley
--
I don't understand what these addresses mean. Would you please help me
understand it?
Did you try reading the documentation?
When an object is traced any copying of the object by the C
function ‘duplicate’ or by arithmetic or mathematical operations
produces a message to
Hi Dave,
I have a few drills available from http://had.co.nz/stat405 - see the
right hand column, about half way down. They seem similar in spirit
to what you're thinking of. You might want to look at the Little
Schemer for a similar approach with a different programming language.
However, I'm
A very common situation is that the users don't know all the possible
return types of 'some_third_party_function()'. If the users don't know
all the return types, he/she can not make sure the return type of
function(x) {...} be always the same. How do you deal with this case?
It's not that
Hi Luc,
You want:
legend.title=theme_text(size=20, hjust = 0)
So the legend title is left aligned, not centred.
Hadley
On Fri, Dec 11, 2009 at 9:26 AM, MUHC_Research
villa...@dms.umontreal.ca wrote:
Dear R-users,
I am preparing graphs for an upcoming article using the different functions
On Wed, Dec 9, 2009 at 4:48 PM, David Reiss dre...@systemsbiology.org wrote:
Ideally I would like to be able to use the function f (in my example)
as-is, without having to designate the environment as an argument, or
to otherwise have to use e$x in the function body.
e - new.env()
e$x - 3
f -
For the case below, you don't need to know anything about how R
manages memory, but you do need to understand basic concepts
algorithmic complexity. You might find The Algorithm Design Manual,
http://www.amazon.com/dp/1848000693, a good start.
Hadley
On Thu, Dec 10, 2009 at 10:26 AM, Peng Yu
Hi Sunita,
To get the bars, you want:
ggplot(mydata, aes(x = factor(jobno), y = recruits)) + geom_bar()
and to add the cumulative sum, first add it to the data:
mydata$cum_ recruits - cumsum(mydata$recruits)
and then add another layer:
+ geom_line(aes(y = cum_recruits, group = 1))
Hadley
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
Is there a version of apply that returns a list without NULL's?
I try to remove NULL elements in the following example, but neither
for loops work. Would you please let me know what the correct way is?
Try this function:
compact - function(x) Filter(Negate(is.null), x)
compact(x)
Hadley
On Wed, Dec 9, 2009 at 9:43 PM, Rolf Turner r.tur...@auckland.ac.nz wrote:
I am working with a somewhat complicated structure in which
I need to deal with a function that takes ``basic'' arguments
and also depends on a number of parameters which change depending
on circumstances.
I thought
Hi Mark,
Why are you using factors? I think for this case you might find
characters are faster and more space efficient.
Alternatively, you can have a look at the plyr package which uses some
tricks to keep memory usage down.
Hadley
On Tue, Dec 8, 2009 at 9:46 PM, Mark Kimpel
The idea of plotting a wind rose must be fairly common. I wonder if it
would make sense to have a switch that would wrap data around the ends of a
continuous scale?
Probably - but it requires a lot of work, because ggplot2 doesn't
currently support circular scales, which is what you really
You mean:
dat - data.frame(x = rnorm(100))
dat1 - data.frame(
x = c(0,0),
y = c(1,0),
Label = c(Point1, Point2)
)
ggplot(dat, aes(x)) +
geom_histogram(aes(fill = ..count..)) +
geom_point(aes(x, y, colour = Label), data = dat1, size = 4) +
scale_fill_gradient(Count, low = green, high
wind rose with another package and wait patiently
until ggplot2 plots the full compass.
Thanks again for a terrific software package.
All the best,
Tom
Begin forwarded message:
From: Thomas S. Dye t...@tsdye.com
Date: December 3, 2009 9:42:27 PM HST
To: hadley wickham h.wick...@gmail.com
On Thu, Dec 3, 2009 at 3:52 PM, John Filben johnfil...@yahoo.com wrote:
Can R support data manipulation programming that is available in the SAS
datastep? Specifically, can R support the following:
- Read multiple dataset one record at a time and compare values from
each; then base
If you're after text, then it's probably a matter of locating the element
that encloses the data you want-- perhaps by using getNodeSet along with an
XPath[1] that specifies the element you are interest with. The text can
then be recovered using the xmlValue() function.
And rather than
Hi Thomas,
I suspect you want geom_bar(stat = identity, width = 1), but it's
hard to be sure without a reproducible example.
Hadley
On Thu, Dec 3, 2009 at 8:18 PM, Thomas S. Dye t...@tsdye.com wrote:
Aloha all,
I love using ggplot. It took a while to get used to the grammar of
graphics,
I'm not sure what the other lines(but the last) have to do anything, but are
you looking for something like this:
do.call(rbind, sapply(paste(1:10, 1:10), strsplit, split=' '))
strsplit is already vectorised wrt its first argument, so all you need is:
do.call(rbind, strsplit(paste(1:10,
the best,
Tom
On Dec 3, 2009, at 4:35 PM, hadley wickham wrote:
Hi Thomas,
I suspect you want geom_bar(stat = identity, width = 1), but it's
hard to be sure without a reproducible example.
Hadley
On Thu, Dec 3, 2009 at 8:18 PM, Thomas S. Dye t...@tsdye.com wrote:
Aloha all,
I love
Because of the combinatorial nature of ggplot2, it is simply not
possible to provide an example that illustrates every single
combination of options. There are already over 600 example graphics
in the package - if you can't find one that exactly meets your need,
you need to buy the book and learn
I don't really understand what you want and the example solution throws away
quite a lot of data, so consider this alternative:
data.out2 - read.table(textConnection(id rater.1 n.1 rater.2 n.2
rater.3 n.3 rater.4 n.4
11 11 0.118 79 NA NA NA NA NA NA
114
mywords- c(harry,met,sally,subway10,1800Movies,12345, not
correct 123)
all.letters - grep(^[[:alpha:]]*$, mywords)
all.numbers - grep(^[[:digit:]]*$, mywords) # numbers
mixed - grep(^[[:digit:][:alpha:]]*$, mywords)
mywords- c(harry,met,sally,subway10,1800Movies,12345,
not correct 123, )
You've asked the same question on stackoverflow.com and received the
same answer. This is rude because it duplicates effort. If you
urgently need a response to a question, perhaps you should consider
paying for it.
Hadley
On Sun, Nov 22, 2009 at 12:04 PM, masterinex xevilgan...@hotmail.com
501 - 600 of 1414 matches
Mail list logo