Displaying 20 results from an estimated 800 matches similar to: "Changes titles in ggplot2 plot"
2010 Nov 02
5
Question about ggplot2
Dear All,
I am trying to graph a simple scatter plot where the x axis is year
and the y axis is a percentage (percentage of infant death). Instead
of plotting the raw data, I want to plot summary statistics such as
mean and median. Here is the problem: the value range of y is between
0 and 1, but since infant death is a rare event, the mean and median
is very low (something like 5%), which shows
2012 Dec 17
5
save to file
Hi,
What's the equivalent of "Save to File" from the R console File menu on an R routine? Just trying
to capture the whole R console into a text file when my code fails.
Felipe D. Carrillo
Supervisory Fishery Biologist
Department of the Interior
US Fish & Wildlife Service
California, USA
http://www.fws.gov/redbluff/rbdd_jsmp.aspx
[[alternative HTML version deleted]]
2011 Apr 03
1
another question on shapefiles and geom_point in ggplot2
Manuel:
I changed your variable names from x to 'long' and y to 'lat' on the
riqueza_out.csv file.
The code below should do what you want. Also, since the legend title is kind of
long, I broke it
down into three lines so you can see more plot area. I am cc'ing the other
groups so more people
use it if needed.
library(rgdal)
library(ggplot2)
library(sp)
library(maptools)
2012 Nov 12
3
arrange data
Dear r-users,
I have daily rainfall data from 1971 to 2000. I would like to extract november and december data only. I would also like to do column bind for november and december, therefore I would like to delete 31 December from december data so that the length of november and december are the same. Hope somebody can help me. I tried this below:
> kuantan.dt.1 <-
2012 Jul 12
2
nls question
Hi:
Using nls how can I increase the numbers of iterations to go beyond 50.
I just want to be able to predict for the last two weeks of the year.
This is what I have:
weight_random <- runif(50,1,24)
weight <- sort(weight_random);weight
weightData <- data.frame(weight,week=1:50)
weightData
plot(weight ~ week, weightData)
M_model <- nls(weight ~ alpha +
2010 Dec 29
2
RGtk2 compilation problem
Dear All,
I am trying to compile&install the package "RGtk2" on my Ubuntu 10.04
box. I did not have problem with earlier versions, but with the new
version, I got the following error message :
-------------------------------------------------------------------------------------------------
* installing *source* package ?RGtk2? ...
checking for pkg-config... /usr/bin/pkg-config
2010 Dec 29
2
RGtk2 compilation problem
Dear All,
I am trying to compile&install the package "RGtk2" on my Ubuntu 10.04
box. I did not have problem with earlier versions, but with the new
version, I got the following error message :
-------------------------------------------------------------------------------------------------
* installing *source* package ?RGtk2? ...
checking for pkg-config... /usr/bin/pkg-config
2008 Feb 18
2
Hazard model with long-term survivor (cure model)
Dear All,
Are there R packages that can estimate survival model with long-term
survivors? This is sometimes known as "cure" model or "split-population"
model. Thanks.
Shige
[[alternative HTML version deleted]]
2017 Jun 07
1
Errors running spdplyr example
Dear All,
When I tried to run the following code (taken from the *spdplyr* package
vignettes):
library(spdplyr)
library(maptools)
data(wrld_simpl)
worldcorner <- wrld_simpl %>%
mutate(lon = coordinates(wrld_simpl)[,1], lat =
coordinates(wrld_simpl)[,2]) %>%
filter(lat < -20, lon > 60) %>%
dplyr::select(NAME)
I got the following error messages:
Error in (function (cl,
2009 Jul 26
3
Sweave, cacheSweave, and data frame
Dear All,
I have been using Sweave (mainly via the Sweave.sh script) and really like
it. I am working a paper (using Sweave, of course) which includes several
time-consuming computations, and it gets tedious to re-compile the whoel
thing every time I made changes. Then I discover the "cacheSweave" package,
which seems the right solution to my problem. I only have on problem. Here
is
2012 Dec 02
4
simple subset question
Hi,
Consider the small dataset below, I want to subset by two variables in
one line but it wont work...it works though if I subset separately. I have
to be missing something obvious that I did not realize before while using subset..
fish <- structure(list(IDWeek = c(27L, 28L, 29L, 30L, 31L, 32L, 33L,
34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L,
47L, 48L, 49L, 50L, 51L,
2005 Aug 30
1
How to set starting values for lmer?
Dear All,
Can anyone give me some hints about how to set starting values for a lmer
model? For complicated models like this, good starting values can help the
numerical computation and make the model converge faster. Thanks!
Shige
[[alternative HTML version deleted]]
2011 Jan 25
1
ggplot - controlling point size
Can anyone illuminate the following for me?
How can I get rid of the blue line in the key in the second plot?
## Create a simple data frame
df=data.frame(x=1:1000, y=2*1:1000+rnorm(1000,sd=1000),
type=sample(letters[1:2],1000, replace=TRUE))
## Very nice! Almost what I want
qplot(x, y, data=df, colour=factor(type)) + geom_smooth()
## Make a nicer plot, with smaller points
## but why
2008 Jan 22
1
Presenting results from multiple models in LaTeX table
Dear All,
Is there a way to present results from multiple models in one LaTeX
table? I did some google search and found out that xtable cannot
automate this process
(https://stat.ethz.ch/pipermail/r-help/2006-August/111174.html), are
there other alternatives? What about Design and Hmisc? Thanks.
Best,
Shige
2023 Aug 02
2
Choosing colours for lines in ggplot2
Hello - I am trying to plot flows in a number of rivers within the same
plot, and need to colour the lines differently, using a colour-blind
palette.
Code beneath works but has colours assigned by the program I have made some
simple dummy data:
## code 1
cb8<- c("#000000", "#E69F00", "#56B4E9", "#009E73","#F0E442", "#0072B2",
2005 Aug 17
4
How to assess significance of random effect in lme4
Dear All,
With kind help from several friends on the list, I am getting close.
Now here are something interesting I just realized: for random
effects, lmer reports standard deviation instead of standard error! Is
there a hidden option that tells lmer to report standard error of
random effects, like most other multilevel or mixed modeling software,
so that we can say something like "randome
2005 Aug 18
1
Error messages using LMER
Dear All,
After playing with lmer for couple of days, I have to say that I am
amazed! I've been using quite some multilevel/mixed modeling packages,
lme4 is a strong candidate for the overall winner, especially for
multilevel generzlized linear models.
Now go back to my two-level poisson model with cross-classified model.
I've been testing various different model specificatios for the
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
2009 Apr 25
2
Changing gird marks in ggplot2
Hi,
When I zoom into a graph created in ggplot2 with the
coord_cartesian(ylim=c(0,5)) option, I have no values labelled on my y-axis.
For this graph ggplot2 only puts labels the y-axis at intervals of 10 (i.e.
0, 10, 20, ...). However, the major portion of the graph I am interested in
is located between the values of 0 and 5 on the y-axis (thus why I am
zoooming). How can I coerce ggplot2 into
2012 Oct 25
2
mean of a value of the last 2 hours
Hello,
I have a data frame somewhat like that:
myframe <- data.frame (ID=c("Ernie", "Ernie", "Ernie", "Bert", "Bert",
"Bert"), Timestamp=c("24.09.2012 09:00", "24.09.2012 10:00", "24.09.2012
11:00"), Hunger=c(1,1,1,2,2,1) )
myframestime <- as.POSIXct (strptime(as.character(myframe$Timestamp),