Displaying 20 results from an estimated 700 matches similar to: "ggplot2: goem_smooth and suppress messages"
2011 Mar 15
3
create data set from selection of rows
Readers,
For a data set:
text1,23,text2,45
text1,23,text3,78
text1,23,text3,56
text1,23,text2,45
The following command was entered:
datasubset<-data.frame(dataset[,3]=="text3")
The result of
datasubset
is
TRUE
TRUE
The required result is
text1,23,text3,78
text1,23,text3,56
What is the correct command to use please?
Thanks in advance.
2016 Apr 09
1
Run script R
hi all ,?
i have an problem in script R . But when I execute the script R I face this error . can you help me please ???error:-----------------------------------------
Error in FUN(X[[i]], ...) :?? Theme element 'text' has NULL property: margin, debugIn addition: Warning messages:1: Removed 361 rows containing non-finite values (stat_smooth).?2: Removed 361 rows containing missing values
2023 Aug 12
2
geom_smooth
Colleagues,
Here is my reproducible code for a graph using geom_smooth
set.seed(55)
scatter_data <- tibble(x_var = runif(100, min = 0, max = 25)
?????????????????????? ,y_var = log2(x_var) + rnorm(100))
library(ggplot2)
library(cowplot)
ggplot(scatter_data,aes(x=x_var,y=y_var))+
? geom_point()+
? geom_smooth(se=TRUE,fill="blue",color="black",linetype="dashed")+
2012 Oct 30
4
Error unary operator
Hi R - listers,
I am receiving an error. Does anyone know what this means? J
ggplot(subset(foo, Rayos != "Rayos.NA"), aes(x=HTL, y=DevelopIndex,
colour=TotalEggs)) +geom_point() +geom_jitter() +
facet_grid(Aeventexhumed ~ Rayos)
+ geom_smooth(method="lm", fill=NA) + ylim(c(0, 7))
Error in +geom_smooth(method = "lm", fill = NA) :
invalid argument to unary
2010 Nov 30
1
Zooming in to a ggplot (a sort of ylim, but ylim won't do)
Dear Helpers,
I wonder whether you might be able to help me. I have a plot composed of
ggplot (and a follow on geom_smooth call). I would like to restrict the
display range of the y axis to a smaller range, a sort of zooming onto a
region. I attempted to use ylim, but it will effect the range (i.e. effect
the geom_smooth call). Is there any way that I can save the results up to
geom_smooth call
2023 Aug 12
1
geom_smooth
?s 05:17 de 12/08/2023, Thomas Subia via R-help escreveu:
> Colleagues,
>
> Here is my reproducible code for a graph using geom_smooth
> set.seed(55)
> scatter_data <- tibble(x_var = runif(100, min = 0, max = 25)
> ?????????????????????? ,y_var = log2(x_var) + rnorm(100))
>
> library(ggplot2)
> library(cowplot)
>
> ggplot(scatter_data,aes(x=x_var,y=y_var))+
2023 May 16
1
Newbie: Drawing fitted lines on subset of data
Hello,
I's still working with my tsibble of weight data for the last 20 years.
In addition to drawing an overall trend line, using lm, for the whole
data set, I'd like to draw short lines that would recompute lm and draw
it, say, just for the years from 2010:2015.
Here's a short example that I think illustrates what I'm trying to do.
The commented out sections show what
2008 Sep 22
2
adding layers in ggplot2 (data and code included)
Here is some sample data:
mydata <- read.table(textConnection("Est Group Tri
0 0 4.639644
1 0 4.579189
2 0 4.590714
0 1 4.443696
1 1 4.588243
2 1 4.650505
0 2 4.296608
1 2 4.826036
2 2 4.765386"),header=TRUE);
closeAllConnections();
I can form two plots,
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
2023 Aug 12
1
geom_smooth
G'day Thomas,
On Sat, 12 Aug 2023 04:17:42 +0000 (UTC)
Thomas Subia via R-help <r-help at r-project.org> wrote:
> Here is my reproducible code for a graph using geom_smooth
The call "library(tidyverse)" was missing. :)
> I'd like to add a black boundary around the shaded area. I suspect
> this can be done with geom_ribbon but I cannot figure this out. Some
>
2009 Aug 18
1
ggplot2: geom_smooth and legend
Hi all,
Is that possible to remove the grey colour in the legend key that goes
with the geom_smooth? In my case it doesn't ease the reading of the
legend.
http://www.4shared.com/file/125864977/e10644f8/desorb.html
Cordialement / Regards
-------------------------------------------
Benoit Boulinguiez
Ecole de Chimie de Rennes (ENSCR) Bureau 1.20
Equipe CIP UMR CNRS 6226 "Sciences
2008 Oct 13
2
Subset based on items in a list.
R-help:
I have a variable ("ID_list") containing about 1800 unique numbers, and a
143066x29 data frame. One of the columns ("ID") in my data frame contains a
list of ids, many of which appear more than once. I'd like to find the
subset of my data frame for which "ID" matches one of the numbers in
"ID_list." I'm pretty sure I could write a function
2023 May 12
2
Newbie: Controlling legends in graphs
Hello, I'm trying to create a line graph with a legend, but have no
success controlling the legend. Since nothing I've tried seems to work,
I must be doing something systematically wrong. Can anyone point this
out to me?
Here's my data:
> weights
# A tibble: 1,246 ? 3
Date J K
<date> <dbl> <dbl>
1 2000-02-13 133 188
2
2012 Dec 12
1
ggplot - adding regression lines
Hi
I am using ggplot to overlay two regression lines on a scatter plot each
corresponding to a treatment group.
The default plot gives a different slope for each treatment group. However,
in some cases i want the lines to be parallel -ie no significant
interaction.
My code:
ggplot(data=df,X,Y,colour=treatment) + geom_point() +
geom_smooth(method="lm")
I think i use the
2010 Jun 24
1
Displaying additional values on the Y-axis ggplot2
Hi,
I am running the following code:
mfg0 <- ggplot(aes(x=Grade,y=Math,colour=RiskStatic45678),data=math.f)
mfg1 <- mfg0 + geom_smooth(method="lm", formula=y ~ ns(x,2),size=1) +
geom_smooth(aes(y=nalt.math,color="NALT"),size=1,data=nalt) +
scale_colour_brewer("Risk Status", pal="Set1") + coord_cartesian(ylim =
c(175, 245))
mfg1
And when I specify
2011 Jun 26
1
changing graphs in qqplot2
This is what I have now so far.
p=ggplot(data = test, aes(x = YEAR, y = TOTAL, colour = TREATMENT)) +
geom_point() + geom_smooth(method = "lm", se=FALSE) + facet_wrap(~COUNTRY)
> p +scale_x_continuous(limits=c(1,4))
http://r.789695.n4.nabble.com/file/n3626510/graph.gif
I would also like to:
1.) change the headline for the faced wraps ?high? and ?low?. Is there any
other way of
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 and Colour")
#facet to get one scatter for
2017 Jun 13
3
How Can I Execute a String Expression?
I have the string ggstr that I've built with string manipulation:
ggstr = "ggplot(df1, aes(x,y)) + geom_smooth(se=FALSE, span=0.01)"
Assuming df1 is properly defined, this string will execute properly if I
submit it manually without the quotes. How can execute the command as a
string, so that I can run it repeatedly (with minor modifications) in a
loop? Presumably, it would be
2011 Nov 10
2
ggplot2 - regression statistics how to display on plot
Hello -
So I am trying to use ggplot2 to show a linear regression between two variables, but I want to also show the fit of the line on the graph as well.
I am using ggplot2 for other graphics in what I am working on, so even though this would be a fairly easy thing to do in Excel, I would prefer to do it in R to keep my look and feel, and I think ggplot2 is just cooler.
Here is a sample
2012 Jan 24
1
Plotting Confidence Intervals with a proiri calculated Intervals
I have already obtained my confidence intervals from a bootstrapping
procedure and now I want to plot the estimates and the confidence intervals
similar to the plots obtained when the geom_smooth function is used in
ggplot2.
Thanks
--
View this message in context: http://r.789695.n4.nabble.com/Plotting-Confidence-Intervals-with-a-proiri-calculated-Intervals-tp4322581p4322581.html
Sent from the R