Displaying 20 results from an estimated 375 matches for "diamond".
2018 Feb 08
2
sparse.model.matrix Generates Non-Existent Factor Levels if Ord.factor Columns Present
Good day,
Sometimes, sparse.model.matrix outputs a dgCMatrix which has column names consisting of factor levels that were not in the original dataset. The first factor appears to be correctly transformed, but the following factors don't. For example:
diamonds <- as.data.frame(ggplot2::diamonds)
> colnames(sparse.model.matrix(~ . -1, diamonds))
[1] "carat" "cutFair" "cutGood" "cutVery Good" "cutPremium" "cutIdeal" "color.L" "color.Q" &...
2009 Sep 11
1
bar chart with means - using ggplot
Like this?
# example using qplot
library(ggplot2)
meanprice <- tapply(diamonds$price, diamonds$cut, mean);meanprice
cut <- factor(levels(diamonds$cut), levels = levels(diamonds$cut))
qplot(cut, meanprice, geom="bar", stat="identity", fill = I("grey50"))
dev.new() # create a new graph to compare with qplot
# Example using ggplot
ggdata <-...
2003 Sep 25
1
Diamond graphs, again.
Some time ago I was allowed to discuss "Diamond Graphs", and whether
they would be useful in R, in this mailing list.
The August 2003 issue of The American Statistician has finally arrived
here and I have been able to read the article. A number of points of
interest arise.
1. The article is
"A Diamond-Shaped Equiponderant Graphi...
2003 Aug 21
3
Diamond graphs
I apologise for starting a new thread, but we had a mail problem and I
don't have the original message to refer to.
Someone mentioned the new "Diamond Graphs" invented at Johns Hopkins.
I haven't see the August 2003 issue of The American Statistician yet,
but I _have_ read the press release.
The press release is a bit of a stunner. I quote:
"Who would have thought we would still be inventing
new methods of graphing in the...
2011 Jun 01
1
Plotting from functions
I can plot to png's fine when i run this directly from the top-level
script/console:
png('diamonds.png');qplot(carat,price,data=diamonds);dev.off()
But for some reason it's not working when that's in a function:
(function(){png('diamonds.png');qplot(carat,price,data=diamonds);dev.off()})()
I suspect this is because the qplot's return value must be "returned"...
2008 Mar 04
1
ggplot2 - Problem with grid plot
Hi R-help
I'm trying to create a grid plot in which each plot in the grid contains two
density plots (colored by factor) and two vertical lines at the respective
medians (also colored by the factor).
Using the diamonds dataset as an example, the following commands give me
price density plots by factor cut in a single, ungridded plot.
p <- ggplot(data=diamonds, aes(x=price)) + geom_density(aes(color=cut))
p
I can add vertical lines at the medians of each density as follows.
medians <- data.frame(cut=lev...
2009 May 07
1
I updated/reinstalled ggplot2 and the trouble started...
Hi Ian,
Per your suggestion, I reinstalled R 2.9.0, then
I reinstalled ggplot2 on top. The problem persists.
Here's the what happens after the installation:
> qplot (carat, price, data = diamonds, alpha = I(1/10))
Warning message:
In grid.Call.graphics("L_points", x$x, x$y, x$pch, x$size) :
semi-transparency is not supported on this device: reported only once per page
The entire record of installing ggplot2 package, ending
up with the line above is in the attached file....
2010 Jul 07
2
how to define method for "+" function in a new class
...I get the following error message:
Error in match.call(fun, fcall) :=20
unused argument(s) (x =3D "Molecule", y =3D "Molecule")
I can't see what's wrong in my method definition. Can anyone help me =
with this?
J
Dr James Foadi PhD
Membrane Protein Laboratory (MPL)
Diamond Light Source Ltd
Diamond House
Harewell Science and Innovation Campus
Chilton, Didcot
Oxfordshire OX11 0DE
Email : james.foadi at diamond.ac.uk
Alt Email: j.foadi at imperial.ac.uk
--
This e-mail and any attachments may contain confidential...{{dropped:8}}
2018 Feb 08
0
sparse.model.matrix Generates Non-Existent Factor Levels if Ord.factor Columns Present
...o Strbenac wrote:
> Good day,
>
> Sometimes, sparse.model.matrix outputs a dgCMatrix which has column names consisting of factor levels that were not in the original dataset. The first factor appears to be correctly transformed, but the following factors don't. For example:
>
> diamonds <- as.data.frame(ggplot2::diamonds)
>> colnames(sparse.model.matrix(~ . -1, diamonds))
> [1] "carat" "cutFair" "cutGood" "cutVery Good" "cutPremium" "cutIdeal" "color.L" "color.Q&quo...
2009 Feb 02
0
Error message when executing summary() with dataset diamonds in ggplot2
Hi: I am experiencing a problem with dataset diamonds in ggplot2. When
trying execute the summary(diamonds) statement, the following error message
is displayed:
Error in summary(diamonds) :
Cannot open file
'C:/Users/James/R_Pgms/R/R-2.8.1/library/ggplot2/data/Rdata.rdb': No such
file or directory
Can you please advise me?
A complete his...
2012 Jan 16
3
boxplot with diamond shape
Hi,
I haven't found in R a possibility to draw a boxplot with a diamond
shape (means and CI).
Does anyone know how to plot it ?
thanks,
2009 Mar 02
3
ways to put multiple graphs on single page (using ggplot2)
Hi, Here are three plots:
library(ggplot2)
data(diamonds)
randind <- sample(nrow(diamonds),1000,replace=FALSE)
dsmall <- diamonds[randind,]
qplot(carat, data=dsmall, geom="histogram",binwidth=1)
qplot(carat, data=dsmall, geom="histogram",binwidth=.1)
qplot(carat, data=dsmall, geom="histogram",binwidth=.01)
What are...
2008 Oct 28
1
does qplot works with Sweave?
...\begin{document}
\maketitle
\section*{Examples of using ggplot2}
The goal is to be able to import ggplot2 graphics into the annual report.
Hadley Wickham has done a great job by creating this free R package.
Let's get some data into R from one the built-in packages:
We'll work with the diamonds data. This dataset is really large, it accounts for
over 50.000 records. We will demostrate how to create nice and colorful graphics
as well as creating some nice tabular tables with horizontal and vertical lines.
<<dataAnalysis.R,echo=F>>=
data(diamonds)
attach(diamonds)
dsmall &l...
2009 Sep 06
5
ggplot2::qplot() -- arbitary transformations of coordinate system?
Hi,
Does anyone know how to do a coord_trans() in which the y-axis is
tranformed into (for example) -1000/y?
Thanks,
_____________________________
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS: P.O.Box 400400 Charlottesville, VA 22904-4400
Parcels: Room 102 Gilmer Hall
McCormick Road Charlottesville, VA 22903
Office: B011
2009 Dec 10
1
question about centroid-linkage (cluster analysis)
...1 -2
[2,] -3 1
[3,] -4 2
[4,] -5 -6
[5,] 3 4
> Y.hc_c$height
[1] 2.000000 1.914214 1.517428 2.000000 9.692575
So, from this it would appear that the distance between the last two clusters is 9.692575!
How can it be?
J
Dr James Foadi PhD
Membrane Protein Laboratory (MPL)
Diamond Light Source Ltd
Diamond House
Harewell Science and Innovation Campus
Chilton, Didcot
Oxfordshire OX11 0DE
Email : james.foadi at diamond.ac.uk
Alt Email: j.foadi at imperial.ac.uk
--
This e-mail and any attachments may contain confidential...{{dropped:8}}
2009 Nov 24
2
convex hull for cluster analysis
...as expecting hull to give me a few 2D points that would enclose the 100 random points generated,
but this doen't seem to be the case.
Probably I'm using the wrong tool here.
Any help with this would be greatly appreciated. Thank you.
J
Dr James Foadi PhD
Membrane Protein Laboratory (MPL)
Diamond Light Source Ltd
Diamond House
Harewell Science and Innovation Campus
Chilton, Didcot
Oxfordshire OX11 0DE
Email : james.foadi at diamond.ac.uk
Alt Email: j.foadi at imperial.ac.uk
--
This e-mail and any attachments may contain confidential...{{dropped:8}}
2010 Sep 10
3
ggplot bar geom: control the filling in the colour legend
Hi all,
Is it possible to change the filling of the squares used to represent
the colour legend in a bar plot with ggplot?
in this example, fillings are raven black, I'd like them white.
ggplot(diamonds, aes(clarity, colour = cut)) + geom_bar()
Regards
--
-------------
Benoit Boulinguiez
Ph.D student
Ecole de Chimie de Rennes (ENSCR) Bureau 1.20
Equipe CIP UMR CNRS 6226 "Sciences Chimiques de Rennes"
Avenue du G?n?ral Leclerc
CS 50837
35708 Rennes CEDEX 7
Tel 33 (0)2 23 23 80 83
Fax...
2011 Feb 17
3
ggplot2, 'se' variable in geom_errorbar's limits?
Dear R-list
I'm working with with geom_errorbar; specifically I'm trying to
reproduce the example Hadley Wickham have on
http://had.co.nz/ggplot2/geom_errorbar.html (all in the button of the
page) where he makes an nice plot with errorbars and then draw lines
between the points.
What confuses me is the 'limits' he defines for the errorbars from the
se variable.
First he creates
2011 Sep 30
2
ggplot2 - extracting values of smooth
Suppose that I'm working on Hadley's diamond dataset and I want to
review the relationship between price, colour and carat.
I might run the following:
library(ggplot2)
#plot scatter and add some hex binning
q<-qplot(carat,price,data=diamonds, geom=c("hex"),
main="Variability of Diamond Prices by Carat an...
2013 Aug 06
1
[LLVMdev] Potential SimplifyCFG optimization; hammock to diamond transformation
Message: 6
Date: Tue, 6 Aug 2013 10:46:19 -0400
From: Chad Rosier <chad.rosier at gmail.com<mailto:chad.rosier at gmail.com>>
To: llvmdev <llvmdev at cs.uiuc.edu<mailto:llvmdev at cs.uiuc.edu>>
Subject: [LLVMdev] Potential SimplifyCFG optimization; hammock to
diamond transformation
Message-ID:
<CAMo3wbR6x1wBzb17=GrkERV7kvzx2RdpuheFzyxkQEs3BBvKaw at mail.gmail.com<mailto:CAMo3wbR6x1wBzb17=GrkERV7kvzx2RdpuheFzyxkQEs3BBvKaw at mail.gmail.com>>
Content-Type: text/plain; charset="iso-8859-1"
All,
I have some code that looks like the following:...