Displaying 20 results from an estimated 4000 matches similar to: "ggplot2 qplot and add"
2007 Jul 31
1
how to sort dataframe levels
Hi everyone,
I've been bashing my head against this for days now, and can't figure out
what to do.
I have the following dataframe
header appetitive stimulus aversive stimulus chaining
contingency discriminative stimulus extinction intermittent
reinforcement negative reinforcer operant response place
learning positive reinforcer punishment reinforcement
2011 Jan 14
2
bug in qplot (library ggplot2)
Hello,
this following code give a nice png:
/library(ggplot2)
i <- 1
png(file=paste('test ',i,'.png',sep=''))
qplot(carat, data=diamonds,
fill=color,geom='histogram')+scale_y_continuous(i)
dev.off()
/
I would like to get more files, but the following code doesn't make any
file:
/library(ggplot2)
for (i in 1:2) {
png(file=paste('test
2008 Mar 04
1
qplot (ggplot2) faceting histogram with missing values
Hi,
I've run into a difficulty with qplot function (in the ggplot2
package). I can facet histograms even when the faceting variable
contains missing values, but only so long as the faceting variable is
not a factor.
Example:
y1 <- rnorm(10)
x1 <- c(rep(1,5), rep(2,4), NA)
x2 <- factor(c(rep(1,5), rep(2,4), NA))
library(ggplot2)
qplot(y1, geom = "histogram", facets =
2012 Jul 18
1
ggplot2 qplot pch not working anymore
Is there a way to use a continuous variable to pch in qplot? I believe
this worked in previous version. I need to specify certain values of a
shape for particular points so that multiple graphs all show the same
shapes for the same streams. I have gone to the original data and added
a pch column that I would like to use to specify the shapes to pch in
qplot. Any help would be greatly
2010 Feb 14
2
Problems with boxplot in ggplot2:qplot
Dataframe closed contains balances of closed accounts: each row has month of
closure (Date-type column month) and latest balance. I would like to plot
by-month distributions of balances. A qplot call below produces several
warnings and no output.
Can anyone help?
Thank you.
PS. A really basic task, very similar to the examples on p. 71 of the
ggplot2 book, apart from a Date grouping column; I
2010 Jun 09
1
specifying plot symbol sizes in qplot or ggplot2
Hi.
first things first ... thanks for ggplot2.
Now my question. I'm using qplot to generate a plot as follows where X,Y,Z,
A are columns in a dataframe.
qplot(X, Y, data=XYDATA, color=Z, geom=c("point"), size=A)
This works as expected. Factor A has three levels so there are three sizes
of the point plot symbol. I understand that the factor levels are mapped to
symbol sizes.
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
2010 May 13
1
ggplot2: qplot won't work
I have a script running in the StatET Eclipse environment that
executes the ggplot2 command qplot in a function:
# Creates the plot
createPlot <- function(){
print("Lets plot!")
qplot(1:10, letters[1:10])
}
When executing the qplot line directly, it works. When executing the
script it does not open a window and it it does not plot. Is there
something important I have forgotten? I
2011 Jun 21
2
qplot/ggplot2 Questions
I took some data from an online poll about which R GUI people used most and I
am messing around with it to learn how to use qplot. Specifically I am
making a horizontal bar graph and I have two questions.
1. The categories are ordered in rather strange way at least to me. It is
not alphabetical or ascending/descending order of votes cast so i had to
manually state the order I wanted which is
2013 Jan 25
1
could not find function "qplot" after install.packages("ggplot2")
On OS X 10.8.2, after I installed ggplot2, and picked mirror of Singapore. it could not find qplot function.
Could anyone pls help me ? Thank you.
Pls see:
> install.packages("ggplot2")--- Please select a CRAN mirror for use in this session ---also installing the dependencies ¡®colorspace¡¯, ¡®stringr¡¯, ¡®RColorBrewer¡¯, ¡®dichromat¡¯, ¡®munsell¡¯, ¡®labeling¡¯, ¡®plyr¡¯,
2011 Jan 05
1
Comparing fitting models
Dear all,
I have 3 models (from simple to complex) and I want to compare them in order to
see if they fit equally well or not.
From the R prompt I am not able to see where I can get this information.
Let´s do an example:
fit1<- lm(response ~ stimulus + condition + stimulus:condition, data=scrd)
#EQUIVALE A lm(response ~ stimulus*condition, data=scrd)
fit2<- lm(response ~ stimulus +
2010 Feb 03
2
ggplot2/qplot question regarding reducing the no. of x-axis labels
All:
I am using the command: qplot(date,MAE,data=data,facets=INTERVAL~type)
which works fine except that the dates for my date axes are crunched
together so much that they are unreadable. I can not find an option that
I can set that will automatically reduce the x-axis labels to fit the
available space.
regards to all?
--
Thomas E Adams
National Weather Service
Ohio River Forecast Center
2011 Jan 05
2
Problem with 2-ways ANOVA interactions
Dear All,
I have a problem in understanding how the interactions of 2 ways ANOVA work,
because I get conflicting results
from a t-test and an anova. For most of you my problem is very simple I am sure.
I need an help with an example, looking at one table I am analyzing. The table
is in attachment
and can be imported in R by means of this command:
scrd<-
2013 Feb 25
1
creating variable that codes for the match/mismatch between two other variables
Dear all,
I have got two vectors coding for a stimulus presented in the current trial (mydat$Stimulus) and a prediction in the same trial (mydat$Prediciton), respectively.
By applying an if-conditional I want to create a new vector that indicates if there is a match between both vectors in the same trial. That is, if the prediction equals the stimulus.
When I pick out some trials randomly, I get
2010 Jun 10
1
Order labels in qplot() - ggplot2 {help}
Hello,
I want to arrage the label according to my preference eg.. (va, vp, a, b,
c) but don't know how to supress default ordering. Any
suggestions?
Please try the code below:
n <- c("va", "vp", "a", "b", "c")
p <- c(2, 2,1, 3,5)
pm<- c(3,4,2,5,4)
pn <- c(1,1,1,2,3)
x<-data.frame(cbind(n,p,pm,pn))
library(ggplot2)
qplot(x=n,
2005 Dec 01
1
LME & data with complicated random & correlational structures
Dear List,
This is my first post, and I'm a relatively new R user trying to work out a
mixed effects model using lme() with random effects, and a correlation
structure, and have looked over the archives, & R help on lme, corClasses, &
etc extensively for clues. My programming experience is minimal (1 semester
of C). My mentor, who has much more programming experience, but a comparable
2011 Jan 07
2
anova vs aov commands for anova with repeated measures
Dear all,
I need to understand a thing in the beheaviour of the two functions aov and
anova in the following case
involving an analysis of ANOVA with repeated measures:
If I use the folowing command I don´t get any problem:
>aov1 = aov(response ~ stimulus*condition + Error(subject/(stimulus*condition)),
>data=scrd)
> summary(aov1)
Instead if I try to fit the same model for the
2011 Jan 09
2
Post hoc analysis for ANOVA with repeated measures
Dear all,
how can I perform a post hoc analysis for ANOVA with repeated measures (in
presence of a balanced design)?
I am not able to find a good example over internet in R...is there among you
someone so kind to give
me an hint with a R example please?
For example, the aov result of my analysis says that there is a statistical
difference between stimuli (there are 7 different stimuli).
...I
2006 May 11
2
greco-latin square
Hi,
I am analyzing a repeated-measures Greco-Latin Square with the aov command.
I am using aov to calculate the MSs and then picking by hand the appropriate
neumerator and denominator terms for the F tests.
The data are the following:
responseFinger
mapping.code Subject.n index middle ring
little
----------------------------------------------------------------------------
1 1
2010 Jun 13
1
Pairwise cross correlation from data set
Dear list,
Following up on an earlier post, I would like to reorder a dataset and
compute pairwise correlations. But I'm having some real problems
getting this done.
My data looks something like:
Participant Stimulus Measurement
p1 s`1 5
p1 s`2 6.1
p1 s`3 7
p2 s`1 4.8
p2