In line
On Mon, 10 Feb 2020 at 15:12, Ana Marija
wrote:
> Hi,
>
> Thanks for getting back to me. I need to have there two groups:
>
> "nPDR.rg and "PDR.rg"
>
Your sample data only contains NoD.rg & nPDR.rg. To start with, I think
we need some representative data supplied in dput format just
Hello,
In the loop, try filtering out the values you do not want.
Any of
print(ggscatter(mds %>% dplyr::filter(cols != "NoD.rg"), etc))
print(ggscatter(subset(mds, cols != "NoD.rg"), etc))
tmp <- mds %>% filter(cols != "NoD.rg")
print(ggscatter(tmp, etc))
The first two will create a tempora
Hi,
Thanks for getting back to me. I need to have there two groups:
"nPDR.rg and "PDR.rg"
can you please let me know how my loop would look like just with those
two groups?
Thanks
Ana
On Mon, Feb 10, 2020 at 2:03 PM John Kane wrote:
>
> I must admit that I do not understand what you are doin
I must admit that I do not understand what you are doing but can you notm
just subset the data?
Note I am using a data.frame not a tibble. It would be helpful if you
could supply sample data in dput() forest.
library("ggpubr")
mds <- structure(list(Dim.1 = c(0.41, 0.184, 0.394, -0.49, 0.635, -0
Hi
Values in conv_df are almost same for each Error level
> aggregate(conv_df$Intercept, list(conv_df$Error), mean)
Group.1 x
1 High CML error -3.226313
2 Low CML error -3.226536
3 Med CML error -3.226422
> aggregate(conv_df$Slope, list(conv_df$Error), mean)
Group.1
On 07/20/2018 02:01 PM, Micha Silver wrote:
On 07/20/2018 01:28 PM, Bert Gunter wrote:
Nothing attached. The mail server strips most attachments for security.
Here is a (slightly shorter) repex.
The fourth plot shows the problem. The first three are as expected.
library(ggplot2)
strat_d
On 07/20/2018 01:28 PM, Bert Gunter wrote:
Nothing attached. The mail server strips most attachments for security.
Here is my repex, inline:
library(ggplot2)
conv_df <- structure(list(Adjustment = structure(c(1L, 2L, 3L, 4L, 5L, 1L,
2L, 3L, 4L, 5L, 1
Nothing attached. The mail server strips most attachments for security.
See the posting guide below and ?dput for how to include data.
+ We need your faulty code also, of course.
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking thing
R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Jim Lemon
Sent: Monday, December 05, 2016 3:02 PM
To: Maria Lathouri
Cc: R-help Mailing List
Subject: Re: [R] scatter plot of numerical variables against different sample
ids
Hi Maria,
Perhaps something like this:
mldf<-read.table(text=
Hi Maria,
Perhaps something like this:
mldf<-read.table(text="Sample Cu Zn Mn
M1 1 5 10
M2 2.5 11 8
M3 1.15 11 12
M4 2 4 30
M5 8 15 35",
header=TRUE)
matplot(mldf,type="b",pch=c("C","Z","M"))
Jim
On Mon, Dec 5, 2016 at 11:25 PM, Maria Lathouri via R-help
wrote:
> Dear al
Hi Maria,
What happens is that R plots with boxplots (explaining the horizontal
lines, i.e. boxes with n=1) when the x-variable is a factor.
What you can do is transform your Sample column into numeric and then
plot it, with some adjustment of axis labels.
For example:
datf <- data.frame(Samp
Thank you all. That was very helpful. Farnoosh
On Saturday, December 6, 2014 7:41 PM, Chel Hee Lee
wrote:
It seems that you would like to make a spaghetti plot (in a longitudinal
data analysis). You can use the function 'interaction.plot()'.
> with(my.df, interaction.plot(TIME
It seems that you would like to make a spaghetti plot (in a longitudinal
data analysis). You can use the function 'interaction.plot()'.
> with(my.df, interaction.plot(TIME, ID, X))
I hope this helps.
Chel Hee Lee
On 12/06/2014 02:24 AM, arun wrote:
Not sure whether it is a scatterplot or
Not sure whether it is a scatterplot or just a plot with 3 lines. If it is the
latter,
library(reshape2)
matplot(acast(my.df, TIME~ID, value.var='X'), type='l', col=1:3, ylab='X',
xlab='TIME')
legend('bottomright', inset=.05, legend=LETTERS[1:3], pch=1, col=1:3)
A.K.
On Friday, December 5,
Hi
My code worked. Your code did not work because you was not aware that R
distinguish case of letters :)
> -Original Message-
> From: Beatriz [mailto:aguitatie...@hotmail.com]
> Sent: Friday, May 30, 2014 12:21 PM
> To: PIKAL Petr; R Help
> Subject: Re: [R] Scatter
(iris$Code %in% sel, "red", "black"),
pch=ifelse(iris$Code %in% sel, 17, 1))
Cheers
On 30/05/2014 17:38, PIKAL Petr wrote:
Hi
-Original Message-
From: Beatriz [mailto:aguitatie...@hotmail.com]
Sent: Friday, May 30, 2014 10:08 AM
To: PIKAL Petr; R Help
Subject: Re:
Hi
> -Original Message-
> From: Beatriz [mailto:aguitatie...@hotmail.com]
> Sent: Friday, May 30, 2014 10:08 AM
> To: PIKAL Petr; R Help
> Subject: Re: [R] Scatter plot selection points
>
> Hi Ptr,
>
> Thanks for your email however, I cannot make the code w
Hi Ptr,
Thanks for your email however, I cannot make the code work.
Also, I quite like the "ifelse" approach. I find it very clean.
Cheers
On 30/05/2014 15:57, PIKAL Petr wrote:
Hi
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Beha
Hi
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Beatriz
> Sent: Friday, May 30, 2014 9:37 AM
> To: R Help
> Subject: [R] Scatter plot selection points
>
> Hi all,
>
> I'd like to do a scatterplot where some of the values, o
In addition to the other responses, I'd like to suggest:
help.search('contour', package='graphics')
Since the graphics package comes with R, you don't necessarily need any
additional package for contouring. But you will need the akima package for
interpolation. Assuming you're doing a contour p
Azam,
If you also have z ~ f(x,y) you can produce contours.
Otherwise, you could look at package hexbin.
Clint
Clint BowmanINTERNET: cl...@ecy.wa.gov
Air Quality Modeler INTERNET: cl...@math.utah.edu
Department of Ecology VOICE: (3
On 24/02/2014 12:45 PM, azam jaafari wrote:
Dear All
I want to convert a scatter plot to a continuous contour plot. I have "x" as a variable
and "y" as another variable.
is there any package for this?
can anybody halp me?
A contour plot of values associated with the points, or a contour plot
Thank you very much for your help !
--
View this message in context:
http://r.789695.n4.nabble.com/Scatter-plot-with-error-bars-tp4670502p4670530.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https
Are you sure, you want to calculate 68% confidence intervals?
Use the add-argument in ?errorbar to add to the previous plot.
errbar(x2,y2,y2+1.96*SD2, y2-1.96*SD2, col="green",pch=19, add=TRUE)
Best,
Nello
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-p
Greg, the pairs2 function was exactly what I wanted. Thanks for a very
useful function. May I ask a follow up question, is it possible to draw a
correlation line with R2 values for each graph on each graph, or on the
side of the graph. I am sure this is possible somehow, but I am new to R
program
The pairs2 function in the TeachingDemos package does what you describe.
You give it 2 matricies instead of just one and it creates the plots.
On Wed, May 8, 2013 at 10:49 AM, Adel wrote:
> Dear list-members,
>
> I wonder if there is a way of creating a scatter plot table/grid with
> different
Several ways but I find that grid.arrange in the gridExtra package combined
with ggplot2 to draw the actual graphs works nicely.
You might also want to look mfcol or mfrow in ?par
### quick and dirty example of ggplot2/gridExtra
library(ggplot2)
library(gridExtra)
mdat <- data.frame(a= 1:5
Try this:
# I created some example data
mydf <- data.frame(
Species=sample(paste0("Species", 1:3), 50, TRUE),
d13C=15+rnorm(50),
d15N=15+rnorm(50),
Year=sample(2009:2012, 50, TRUE))
attach(mydf)
Nmean <- tapply(d15N, list(Year,Species), mean)
Cmean <- tapply(d13C
First let me say thank you for all the help everyone gave me.
Below is the code I came up with to look at Rainfall pH reading for
Kentucky and Tennessee.
Also there is a more *generic* ver of the code on my web page if anybody
ever needs it in the future.
http://sites.google.com/site/davidsstatis
You can also use range( MC.pH, MV.pH, na.rm=TRUE).
On Tue, Apr 24, 2012 at 1:29 PM, David Doyle wrote:
> Hi Greg,
>
> Sloved my own problem.
>
> I had some missing data "NA" in the datasets. So I manually entered the
> ylim=range(4,6)
> and it worked!!!
>
> Thanks!!
> David
>
>
> On Tue, Apr 24,
Hi Greg,
Sloved my own problem.
I had some missing data "NA" in the datasets. So I manually entered the
ylim=range(4,6)
and it worked!!!
Thanks!!
David
On Tue, Apr 24, 2012 at 1:55 PM, David Doyle wrote:
> Hi Greg,
>
> Thanks,
>
> I got the 1st example to work using the following code:
>
>
>
Hi Greg,
Thanks,
I got the 1st example to work using the following code:
data <- read.csv("http://doylesdartden.com/Monthly-pH-example.csv";, sep=",")
attach(data)
par(mfrow=c(2,1))
scatter.smooth( Year, MC.pH )
scatter.smooth( Year, MV.pH )
This is good but what I'm really looking for is t
Hi Michael,
What I run into is that I have a lot of time-series data from groundwater
wells but when plot it..it becomes way to busy to see what is going on.
For example, here is the code to load and plot my Mammoth Cave rainfall pH
data
#Load data from web page
data <- read.csv("http://doylesda
Assuming that you want event as the x-axis (horizontal) you can do
something like (untested without reproducible data):
par(mfrow=c(2,1))
scatter.smooth( event, pH1 )
scatter.smooth( event, pH2 )
or
plot( event, pH1, ylim=range(pH1,pH2) , col='blue')
points( event, pH2, col='green' )
lines( loes
The scatter plot is easy:
plot(pH1 ~ pH2, data = OBJ)
When you say a loess for each -- how do you break them up? Are there
repeat values for pH1? If so, this might be hard to do in base
graphics, but ggplot2 would make it easy:
library(ggplot2)
ggplot(OBJ, aes(x = pH1, y = pH2)) + geom_point() +
Hello all,
Yesterday I wrote Michael Weylandt to ask for some help in understanding
a line of code he used responding to SarahH's query about controlling
colours in scatter plots. He wrote an excellent explanation that
deserves to be shared here. Below I include the code I wrote while
experim
Success with the lines command and col argument! I have some nice point and
line plots.
Thanks so much for you help. Ongoing project - I will probably be back!
Sarah
--
View this message in context:
http://r.789695.n4.nabble.com/Scatter-plot-using-colour-to-group-points-tp4092794p4097625.html
S
There's also the lines() command which takes a col argument if you want to do
multiple lines (I usually wind up wrapping it in a for loop though there might
be something smarter)
ggplot2 is great, though the learning curve is a little rough: you can get good
help here but if you go down that pa
Thanks all for suggestions.
I now have a nice plot showing the temperature of 6 different sites, each
site distinguished by different coloured points, using nested ifelse. My
apologies I thought I could change the type to "l" and the same arguments
would be applied to line graph, with 6 different
On 11/22/2011 05:00 PM, David Winsemius wrote:
On Nov 21, 2011, at 10:18 PM, R. Michael Weylandt wrote:
I don't think you can do different colors for a single line (not an
ifelse thing, just a what would that mean sort of thing), but a plot
type like "b" "o" or "h" will work the same way.
I
On Nov 21, 2011, at 10:18 PM, R. Michael Weylandt wrote:
I don't think you can do different colors for a single line (not an
ifelse thing, just a what would that mean sort of thing), but a plot
type like "b" "o" or "h" will work the same way.
I think Jim Lemon has a multicolored line function
I don't think you can do different colors for a single line (not an
ifelse thing, just a what would that mean sort of thing), but a plot
type like "b" "o" or "h" will work the same way.
Michael
On Mon, Nov 21, 2011 at 4:23 PM, SarahH wrote:
> I got the colour vector with ifelse to work, great! T
Another approach would be to use ggplot2.
Code can look a bit daunting to begin with but ggplot2 is a
very versitile graphing package and well worth learning.
Simple example
=
library(ggplot2)
mydata <- data.frame(site=c("A","A","A", "
I got the colour vector with ifelse to work, great! Thank you.
Is it possible to use the ifelse colour vector with other plot types? For
example with type=l ? I tried but the graphic came back with blue lines for
both sites and also a straight line connecting the start and end point of
the data?
I think the easiest way to do this is to set up a color vector with
ifelse and hand that off to the plot command: something like
col = ifelse(TEMP3[,"SITE"] == "BG1", "blue", "green") # Syntax is
ifelse(TEST, OUT_IF_TRUE, OUT_IF_FALSE)
For more complicated schemes, a set of nested ifelse()'s can
On Nov 21, 2011, at 2:17 PM, SarahH wrote:
Dear All,
I am very new to R - trying to teach myself it for some MSc
coursework.
I am plotting temperature data for two different sites over the same
time
period which I have downloaded from a university weather station data
archive.
I am usi
Hi Rich,
Using the data set "iris" as an example, you might also try
require(car)
scatterplot(Petal.Length ~ Sepal.Length | Species, data = iris)
HTH,
Jorge
On Wed, Aug 31, 2011 at 4:50 PM, Rich Shepard <> wrote:
> I've tried various commands. ?plot, Teetor's book, "R Cookbook", and
> Mittal
On Thu, 1 Sep 2011, baptiste auguie wrote:
Below are a couple of options using a standard dataset,
Thanks, Baptiste. These point me in the right direction.
Rich
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLE
Hi,
Below are a couple of options using a standard dataset,
str(iris)
## using base graphics
d <- split(iris, iris$Species)
str(d) # list of 3 data.frames
par(mfrow=n2mfrow(length(d))) # split the device in 3 plotting regions
b.quiet <- lapply(names(d), function(x) { # loop over the list names
This is a really basic question that is answered in many R tutorials.
Why dont you just google:
"R import csv"
And the first hit will tell you straight away what to do?
Jannis
P.S. I just guessed from your not very specific post that you may want
to import from csv ...
On 08/05/2011 12:45
It likely means that your x and y are differently long. That is, affect1 and
adh1scr do not contain the same number of values in that instance. That
precludes them from being plotted against each other. abline and lowess
would fail for the same reason.
x<-c(1,2,3)
y<-c(2,4)
plot(y~x)
complete.case
I am sure you would have found answers to your questions if you would have
searched the mailing list archive
(http://r.789695.n4.nabble.com/R-help-f789696.html)!
To get you started, have a look at:
?text (for the z values)
?abline (for the line)
Jannis
--- Matevž Pavlič schrieb am Mi, 4.
Hi Joe,
The easiest option will be to combine all 6 datasets (at least the
variables you want to use in your scatter plot), and then create
another variable that indicates to which group the observations
belong. Here is a small example of what you might do once your data
are all together (obvious
Finally I get a plot manual...so I got the solution
Sorry about inconveniences
2009/11/24, Jose Narillos de Santos :
>
> Hi All,
>
> My doub I think is very simple. I hope it is. So you can again help, guide
> me.
>
> I´m trying to make a graph (scatter graph) about two variables, imagin
Many thanks Duncan. I got the plot even I don't really understand the whole
command..
I will study that later..
:-)
Regards
On Sun, Nov 22, 2009 at 4:44 PM, Duncan Murdoch wrote:
> On 22/11/2009 11:27 AM, Rofizah Mohammad wrote:
>
>> Hi,
>>
>> If I have 2D data set say (x,y) and I can do sca
On Nov 22, 2009, at 11:27 AM, Rofizah Mohammad wrote:
Hi,
If I have 2D data set say (x,y) and I can do scatter plot by using
plot(x,y)
command.
How can I add in this scatter plot the equations curve say
2X2 + 3Y2 6X 7Y + 9 = 0.
No executable example... so if you are too lazy to cons
On 22/11/2009 11:27 AM, Rofizah Mohammad wrote:
Hi,
If I have 2D data set say (x,y) and I can do scatter plot by using plot(x,y)
command.
How can I add in this scatter plot the equations curve say
2X2 + 3Y2 – 6X – 7Y + 9 = 0.
You could do it using contour(), but you should use an equation tha
The help page for the subplot function in the TeachingDemos package shows an
example of doing what you ask. The my.symbols function in the same package may
work better (depending on what exactly you want).
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s.
Hi,
You'll probably find that there are two parts to your query:
1- import a bitmap into R, for this I'd suggest the wiki page,
http://wiki.r-project.org/rwiki/doku.php?id=tips:graphics-misc:display-images
2- place the image (now some sort of matrix of colour points) at
different locations on a
please Cc. the list next time
Two suggestions,
1) read the help page, e.g. ?points would have told you why pch="10"
produces "1".
2) Try the following and see which you prefer,
x = y = labels = 1:20
?text
plot(x, y, type='n') # empty plot
text(x, y, paste(labels))
library(ggplot2)
?qplot
qplo
x <- 1:10
y <- 1:10
plot("", xlim=c(1,10),ylim=c(0,10)
text(x,y, labels=x)
--- On Thu, 7/30/09, amna khan wrote:
> From: amna khan
> Subject: [R] Scatter Plot
> To: r-help@r-project.org
> Received: Thursday, July 30, 2009, 12:14 PM
> Dear Sir
>
> I want to write the numbers 1,2,3,on a sca
Tri this for both, points and text..
library(ggplot2)
qplot(x=1:5,y=1:5) + geom_text(label=1:5)
Felipe D. Carrillo
Supervisory Fishery Biologist
Department of the Interior
US Fish & Wildlife Service
California, USA
--- On Thu, 7/30/09, amna khan wrote:
> From: amna khan
> Subject: [
Hi,
Try this,
plot(1:5,1:5, t='p', pch=paste(1:5))
baptiste
2009/7/30 amna khan :
> Dear Sir
>
> I want to write the numbers 1,2,3,on a scatter plot instead of points,
> like 1 corresponding to first point on plot, 2 corresponding second point
> etc.
> Help in this regard.
>
> Regards
>
>
Hi Stephen: If you want to take tem out of quotes, you can use deparse
substitute as in below. Maybe there are other ways
also but that's the one I often see used. I hope this email ends
up looking okay because my mailer has been acting strangely lately.
         Â
#excel like regression line but better
reg.line <- function(y,x, data)
{plot(data[,y]~data[,x], main=paste(x,"vs.",y, sep=" "), xlab=x, ylab=y, pch=20)
line <- lm(data[,y]~data[,x])
d <- summary(line)
mtext(3, line=1, adj=0.25 ,text=bquote(bold(R^2== ~ .(d$r.squared))), bty="n")
abline(line)}
x <
Tena koe Sueli
?abline
?text
HTH ...
Peter Alspach
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Sueli Rodrigues
> Sent: Thursday, 2 April 2009 2:35 p.m.
> To: r-help@r-project.org
> Subject: [R] Scatter plot
>
>
> Hi.
At 12:19 AM 3/4/2009, you wrote:
plot(x,rho,pch=id)
Or this.
Tim
> dat
id x rho
1 A 1 0.1
2 B 20 0.5
3 C 2 0.9
> labels<-dat$id
> labels
[1] "A" "B" "C"
> plot(dat$x,dat$rho,pch=labels)
__
R-help@r-project.org mailing list
https://stat.ethz
plot(x,rho,pch=id)
-Mensaje original-
De: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]en
nombre de Dipankar Basu
Enviado el: 03 March 2009 20:11
Para: r-help@r-project.org
Asunto: [R] scatter plot question
Hi R Users,
I have a dataframe like this:
id x rho
A 1
Dipankar Basu gmail.com> writes:
>
> Hi R Users,
>
> I have a dataframe like this:
>
> id x rho
> A 1 0.1
> B 20 0.5
> C 2 0.9
> ...
>
> I want to do a scatter plot of "x" versus "rho" but for each point on the
> scatter plot I want the corresponding entry for "id" instead of point
hadley wickham
CC: [EMAIL PROTECTED]
Onderwerp: Re: [R] scatter plot using ggplot
Thanks for this mail. However I am getting following error on that :
Error in inherits(formula, "formula") : could not find function "aes"
And regarding my 3rd query I actually wanted to get &q
--- On Tue, 7/22/08, hadley wickham <[EMAIL PROTECTED]> wrote:
> From: hadley wickham <[EMAIL PROTECTED]>
> Subject: Re: [R] scatter plot using ggplot
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Date: Tuesday, July 22, 2008, 10:00 PM
> On Tue, Jul 22, 2008
On Tue, Jul 22, 2008 at 3:42 AM, Megh Dal <[EMAIL PROTECTED]> wrote:
> I used ggplot to create a scatter plot :
>
> library(ggplot)
> library(mnormt)
> Sigma = matrix(c(1, 0.6, 0.6, 1), 2, 2)
> x = rmnorm(20, c(0,0), Sigma)
> xx = x[order(x[,1]),]
> y = xx[,1]
> z = xx[,2]
> qplot(z, y, type="point
Thanks, I think I've got it on Mac. Will try with my windows station
tomorrow.
Best,
Anh Tran
On Jun 21, 2008, at 12:05 AM, Prof Brian Ripley wrote:
Please see the footer of this message. What do you want to be
transparent, and what did you use to try to get it (there are many
possibil
Please see the footer of this message. What do you want to be
transparent, and what did you use to try to get it (there are many
possibilities)? What OS and version of R is this?
Note that the default value of "bg" for the png() and tiff() devices is
"white", and the Windows version of the t
Hi Anh,
I don´t know if I understood your point fine.
I generate a scatterplot, and open it on adobe photoshop 7.0 with tranparent
background.
setwd("c:\\temp")
x<-runif(100)
y<-rnorm(100)
png("transparent_scatterplot.png", 800, 600, bg="transparent")
plot(y~x)
dev.off()
I hope this help,
mil
On 5/6/2008 11:46 AM, A Ezhil wrote:
Hi,
I have 3 vectors,
x=rnorm(10); y=rnorm(20); z=rnorm(30).
I would like to plot 3 vectors side by side (like a
bar plot) with scatter plot something similar to the
following:
.. *** ;;;
.. ** ;;;
.. *** ;;;
.. *** ;;;
... *** ;;
x
> Could anyone give suggestions how to plot a scatter plot with 1 standard
> deviation for each point. To make it clearer, here is a simple example: the
> scatterplot is plot(X, Y), but I want to add 1 standard deviation according
> to the value of Z for each Y.
You can do this with ggplot2 with t
Thanks, Jim. That's exactly what I want.
FD
On 10/21/07, Jim Lemon <[EMAIL PROTECTED]> wrote:
>
> FD wrote:
> > Hi,
> >
> > Could anyone give suggestions how to plot a scatter plot with 1 standard
> > deviation for each point. To make it clearer, here is a simple example:
> the
> > scatterplot is
FD wrote:
> Hi,
>
> Could anyone give suggestions how to plot a scatter plot with 1 standard
> deviation for each point. To make it clearer, here is a simple example: the
> scatterplot is plot(X, Y), but I want to add 1 standard deviation according
> to the value of Z for each Y.
>
> X Y
79 matches
Mail list logo