Re: [R] graph in R with grouping letters from the turkey test with agricolae package

2023-09-14 Thread Ebert,Timothy Aaron
Why insist on agricolae?
Here is an example using multcompiew
https://r-graph-gallery.com/84-tukey-test.html

You have the same question posted to stackoverflow.
https://stackoverflow.com/questions/77090467/graph-in-r-with-grouping-letters-from-the-tukey-lsd-duncan-test-with-agricolae

I searched in Google for these key words
Tukey letters r graph agricolae

There are some youtube videos that could help.

Tim

-Original Message-
From: R-help  On Behalf Of Loop Vinyl
Sent: Tuesday, September 12, 2023 6:15 PM
To: Rui Barradas 
Cc: r-help@r-project.org
Subject: Re: [R] graph in R with grouping letters from the turkey test with 
agricolae package

[External Email]

Yes, the data and the R code used are attached.

I would like to produce the attached graph (graph1) with the R package 
agricolae, could someone give me an example with the attached data (vermiwash 
and Rcode_vermiwash)?

Fig. 7, https://doi.org/10.1007/s42729-023-01295-3

I expect an adapted graph (graphDoubleFactor) with the data (vermiwash and
Rcode_vermiwash)


Best regards

Em ter., 12 de set. de 2023 às 18:54, Rui Barradas 
escreveu:

> Às 16:24 de 12/09/2023, Loop Vinyl escreveu:
> > I would like to produce the attached graph (graph1) with the R
> > package agricolae, could someone give me an example with the
> > attached data
> (data)?
> >
> > I expect an adapted graph (graph2) with the data (data)
> >
> > Best regards
> >
> >
> > __
> > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > https://st/
> > at.ethz.ch%2Fmailman%2Flistinfo%2Fr-help&data=05%7C01%7Ctebert%40ufl
> > .edu%7Cd1f6a3f22b2342539d2208dbb54bc3cf%7C0d4da0f84a314d76ace60a6233
> > 1e1b84%7C0%7C0%7C638303109249629455%7CUnknown%7CTWFpbGZsb3d8eyJWIjoi
> > MC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C
> > %7C%7C&sdata=wENmYQXTgTRuI2efqtiQdOs3hRvP8RGWAVWdowI0ozM%3D&reserved
> > =0
> > PLEASE do read the posting guide
> http://www.r/
> -project.org%2Fposting-guide.html&data=05%7C01%7Ctebert%40ufl.edu%7Cd1
> f6a3f22b2342539d2208dbb54bc3cf%7C0d4da0f84a314d76ace60a62331e1b84%7C0%
> 7C0%7C638303109249629455%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiL
> CJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=hz
> C51PsGAZD3X8vpS%2BR3MKosY6wKt91KPkQ8r4mAf7c%3D&reserved=0
> > and provide commented, minimal, self-contained, reproducible code.
> Hello,
>
> There are no attached graphs, only data.
> Can you post the code have you tried?
>
> Hope this helps,
>
> Rui Barradas
>
>

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph in R with grouping letters from the turkey test with agricolae package

2023-09-14 Thread Jeff Newmiller via R-help
This request sounds a lot like "do my work for me"... even like it might be 
homework... both scenarios are disallowed here.

Also, you need to read the Posting Guide... not all attachments are allowed on 
this mailing list, so even if you attached an image we did not get it. Go look 
at the mailing list archive to see what we got instead of what you sent.

On September 12, 2023 3:15:17 PM PDT, Loop Vinyl  wrote:
>Yes, the data and the R code used are attached.
>
>I would like to produce the attached graph (graph1) with the R package
>agricolae, could someone give me an example with the attached data
>(vermiwash and Rcode_vermiwash)?
>
>Fig. 7, https://doi.org/10.1007/s42729-023-01295-3
>
>I expect an adapted graph (graphDoubleFactor) with the data (vermiwash and
>Rcode_vermiwash)
>
>
>Best regards
>
>Em ter., 12 de set. de 2023 às 18:54, Rui Barradas 
>escreveu:
>
>> Às 16:24 de 12/09/2023, Loop Vinyl escreveu:
>> > I would like to produce the attached graph (graph1) with the R package
>> > agricolae, could someone give me an example with the attached data
>> (data)?
>> >
>> > I expect an adapted graph (graph2) with the data (data)
>> >
>> > Best regards
>> >
>> >
>> > __
>> > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> > https://stat.ethz.ch/mailman/listinfo/r-help
>> > PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> > and provide commented, minimal, self-contained, reproducible code.
>> Hello,
>>
>> There are no attached graphs, only data.
>> Can you post the code have you tried?
>>
>> Hope this helps,
>>
>> Rui Barradas
>>
>>

-- 
Sent from my phone. Please excuse my brevity.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph in R with grouping letters from the turkey test with agricolae package

2023-09-14 Thread Bert Gunter
No graphs. The link is paywalled.

Bert Gunter

On Thu, Sep 14, 2023 at 10:55 AM Loop Vinyl  wrote:

> Yes, the data and the R code used are attached.
>
> I would like to produce the attached graph (graph1) with the R package
> agricolae, could someone give me an example with the attached data
> (vermiwash and Rcode_vermiwash)?
>
> Fig. 7, https://doi.org/10.1007/s42729-023-01295-3
>
> I expect an adapted graph (graphDoubleFactor) with the data (vermiwash and
> Rcode_vermiwash)
>
>
> Best regards
>
> Em ter., 12 de set. de 2023 às 18:54, Rui Barradas 
> escreveu:
>
> > Às 16:24 de 12/09/2023, Loop Vinyl escreveu:
> > > I would like to produce the attached graph (graph1) with the R package
> > > agricolae, could someone give me an example with the attached data
> > (data)?
> > >
> > > I expect an adapted graph (graph2) with the data (data)
> > >
> > > Best regards
> > >
> > >
> > > __
> > > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > > https://stat.ethz.ch/mailman/listinfo/r-help
> > > PLEASE do read the posting guide
> > http://www.R-project.org/posting-guide.html
> > > and provide commented, minimal, self-contained, reproducible code.
> > Hello,
> >
> > There are no attached graphs, only data.
> > Can you post the code have you tried?
> >
> > Hope this helps,
> >
> > Rui Barradas
> >
> >
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph in R with grouping letters from the turkey test with agricolae package

2023-09-14 Thread Loop Vinyl
Yes, the data and the R code used are attached.

I would like to produce the attached graph (graph1) with the R package
agricolae, could someone give me an example with the attached data
(vermiwash and Rcode_vermiwash)?

Fig. 7, https://doi.org/10.1007/s42729-023-01295-3

I expect an adapted graph (graphDoubleFactor) with the data (vermiwash and
Rcode_vermiwash)


Best regards

Em ter., 12 de set. de 2023 às 18:54, Rui Barradas 
escreveu:

> Às 16:24 de 12/09/2023, Loop Vinyl escreveu:
> > I would like to produce the attached graph (graph1) with the R package
> > agricolae, could someone give me an example with the attached data
> (data)?
> >
> > I expect an adapted graph (graph2) with the data (data)
> >
> > Best regards
> >
> >
> > __
> > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> Hello,
>
> There are no attached graphs, only data.
> Can you post the code have you tried?
>
> Hope this helps,
>
> Rui Barradas
>
>
library(agricolae)

dados <- read.table("vermiwash.txt", header = TRUE)
head(dados)
View(dados)

DOSE <- factor(dados$TREAT)
levels(DOSE)

CUT <- factor(dados$CUT)
levels(CUT)

#com a variável 1
model_var1<-aov(VAR1~DOSE*CUT, data=dados)
summary(model_var1)
cv.model(model_var1)


#
#var1
tukey_var1 <- HSD.test(model_var1, c("DOSE", "CUT"), main="VAR1 ~ DOSE*CUT", 
console=TRUE)
head(tukey_var1)

#
x11() 
bar.group(tukey_var1$groups,main="Teste de Tukey", ylim=c(0,50), 
xlab="Tratamentos (Dosagem)") 

#OR

#var1
compara.tukey.agri <- HSD.test(model_var1, "DOSE" ,group=T) 
compara.tukey.agri 

x11() 
bar.group(compara.tukey.agri$groups,main="Teste de Tukey", ylim=c(0,50), 
xlab="Tratamentos (DOSE)") 



TREAT   CUT REP VAR1
Z   1   1   16.1
Z   1   2   14.1
Z   1   3   5.8
Z   1   4   4.9
Z   2   1   16.1
Z   2   2   14.1
Z   2   3   5.8
Z   2   4   4.9
Z   3   1   16.1
Z   3   2   14.1
Z   3   3   5.8
Z   3   4   4.9
Z   4   1   16.1
Z   4   2   14.1
Z   4   3   5.8
Z   4   4   4.9
5   1   1   30.8
5   1   2   29
5   1   3   28.8
5   1   4   16.6
5   2   1   30.8
5   2   2   29
5   2   3   28.8
5   2   4   16.6
5   3   1   30.8
5   3   2   29
5   3   3   28.8
5   3   4   16.6
5   4   1   30.8
5   4   2   29
5   4   3   28.8
5   4   4   16.6
10  1   1   31.3
10  1   2   29.6
10  1   3   28.1
10  1   4   19.5
10  2   1   31.3
10  2   2   29.6
10  2   3   28.1
10  2   4   19.5
10  3   1   31.3
10  3   2   29.6
10  3   3   28.1
10  3   4   19.5
10  4   1   31.3
10  4   2   29.6
10  4   3   28.1
10  4   4   19.5
15  1   1   27.3
15  1   2   13.7
15  1   3   8.1
15  1   4   0
15  2   1   27.3
15  2   2   13.7
15  2   3   8.1
15  2   4   0
15  3   1   27.3
15  3   2   13.7
15  3   3   8.1
15  3   4   0
15  4   1   27.3
15  4   2   13.7
15  4   3   8.1
15  4   4   0
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph in R with grouping letters from the turkey test with agricolae package

2023-09-13 Thread peter dalgaard
Yes. Old John T. must be turning on his skewer...er, in his grave, I mean.

(I gather he was actually more amicable than that, though.)

- pd

> On 13 Sep 2023, at 16:20 , Ben Bolker  wrote:
> 
>  As a side note, I'm curious how often "Tukey test" is misspelled as "Turkey 
> test".
> 
> 
> Googling '"turkey test" mean comparison' gives 36.1K results (vs 14.3M for 
> '"tukey test" mean comparison" ...
> 
> 
> 
> On 2023-09-13 10:02 a.m., Richard O'Keefe wrote:
>>> d <- read.table("data.txt", TRUE)
>>> cor(d[, 3:6])
>>  VAR1 VAR2 VAR3 VAR4
>> VAR11111
>> VAR21111
>> VAR31111
>> VAR41111
>> VAR1 to VAR4 are, up to linear scaling,
>> exactly the same variable.  Why is that?
>> On Wed, 13 Sept 2023 at 07:38, Loop Vinyl  wrote:
>>> I would like to produce the attached graph (graph1) with the R package
>>> agricolae, could someone give me an example with the attached data (data)?
>>> 
>>> I expect an adapted graph (graph2) with the data (data)
>>> 
>>> Best regards
>>> __
>>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide
>>> http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>>> 
>>  [[alternative HTML version deleted]]
>> __
>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
> 
> -- 
> Dr. Benjamin Bolker
> Professor, Mathematics & Statistics and Biology, McMaster University
> Director, School of Computational Science and Engineering
> (Acting) Graduate chair, Mathematics & Statistics
> > E-mail is sent at my convenience; I don't expect replies outside of working 
> > hours.
> 
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd@cbs.dk  Priv: pda...@gmail.com

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph in R with grouping letters from the turkey test with agricolae package

2023-09-13 Thread Ebert,Timothy Aaron
+"turkey test +"mean comparison" 84 hits in google scholar.

There is an aphid "Aphis gossypii." Some people have changed this to "Apis 
gossypii." "Apis" is a genus for bees, and there is no critter named "Apis 
gossypii." However there are 45 papers in google scholar suffering from this 
malady. Some of them the error is in the way the paper was entered into the 
search engine. If I look at the published paper there is no mistake. It is most 
fun when Apis mellifera and Apis gossypii exist in the same paper.


In the USA, thanksgiving is a holiday that often includes a meal with turkey. 
Sometimes the holiday is called turkey day. I wrote in the stats lab "Happy 
Tukey Day". While most things were erased after a day or so, this stayed for 
several months.


Tim

-Original Message-
From: R-help  On Behalf Of Ben Bolker
Sent: Wednesday, September 13, 2023 10:20 AM
To: r-help@r-project.org
Subject: Re: [R] graph in R with grouping letters from the turkey test with 
agricolae package

[External Email]

   As a side note, I'm curious how often "Tukey test" is misspelled as "Turkey 
test".


Googling '"turkey test" mean comparison' gives 36.1K results (vs 14.3M for 
'"tukey test" mean comparison" ...



On 2023-09-13 10:02 a.m., Richard O'Keefe wrote:
>> d <- read.table("data.txt", TRUE)
>> cor(d[, 3:6])
>   VAR1 VAR2 VAR3 VAR4
> VAR11111
> VAR21111
> VAR31111
> VAR41111
>
> VAR1 to VAR4 are, up to linear scaling, exactly the same variable.
> Why is that?
>
>
> On Wed, 13 Sept 2023 at 07:38, Loop Vinyl  wrote:
>
>> I would like to produce the attached graph (graph1) with the R
>> package agricolae, could someone give me an example with the attached data 
>> (data)?
>>
>> I expect an adapted graph (graph2) with the data (data)
>>
>> Best regards
>> __
>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://sta/
>> t.ethz.ch%2Fmailman%2Flistinfo%2Fr-help&data=05%7C01%7Ctebert%40ufl.e
>> du%7C3610c6d64e8f4d139df408dbb465daba%7C0d4da0f84a314d76ace60a62331e1
>> b84%7C0%7C0%7C638302121786328675%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w
>> LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7
>> C&sdata=7quLdbmh83%2BJqwfZHISjo4KeH3tNT6h%2BlotUj2cr5hs%3D&reserved=0
>> PLEASE do read the posting guide
>> http://www/.
>> r-project.org%2Fposting-guide.html&data=05%7C01%7Ctebert%40ufl.edu%7C
>> 3610c6d64e8f4d139df408dbb465daba%7C0d4da0f84a314d76ace60a62331e1b84%7
>> C0%7C0%7C638302121786328675%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
>> DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sda
>> ta=s8cw488pbXCFKqt2M2f%2ByvJ0w6OaIwW1beDEcBF%2B%2FbE%3D&reserved=0
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>   [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat/
> .ethz.ch%2Fmailman%2Flistinfo%2Fr-help&data=05%7C01%7Ctebert%40ufl.edu
> %7C3610c6d64e8f4d139df408dbb465daba%7C0d4da0f84a314d76ace60a62331e1b84
> %7C0%7C0%7C638302121786328675%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw
> MDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sda
> ta=7quLdbmh83%2BJqwfZHISjo4KeH3tNT6h%2BlotUj2cr5hs%3D&reserved=0
> PLEASE do read the posting guide
> http://www.r/
> -project.org%2Fposting-guide.html&data=05%7C01%7Ctebert%40ufl.edu%7C36
> 10c6d64e8f4d139df408dbb465daba%7C0d4da0f84a314d76ace60a62331e1b84%7C0%
> 7C0%7C638302121786328675%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiL
> CJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=s8
> cw488pbXCFKqt2M2f%2ByvJ0w6OaIwW1beDEcBF%2B%2FbE%3D&reserved=0
> and provide commented, minimal, self-contained, reproducible code.

--
Dr. Benjamin Bolker
Professor, Mathematics & Statistics and Biology, McMaster University Director, 
School of Computational Science and Engineering
(Acting) Graduate chair, Mathematics & Statistics  > E-mail is sent at my 
convenience; I don't expect replies outside of working hours.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.r-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph in R with grouping letters from the turkey test with agricolae package

2023-09-13 Thread Ben Bolker
  As a side note, I'm curious how often "Tukey test" is misspelled as 
"Turkey test".



Googling '"turkey test" mean comparison' gives 36.1K results (vs 14.3M 
for '"tukey test" mean comparison" ...




On 2023-09-13 10:02 a.m., Richard O'Keefe wrote:

d <- read.table("data.txt", TRUE)
cor(d[, 3:6])

  VAR1 VAR2 VAR3 VAR4
VAR11111
VAR21111
VAR31111
VAR41111

VAR1 to VAR4 are, up to linear scaling,
exactly the same variable.  Why is that?


On Wed, 13 Sept 2023 at 07:38, Loop Vinyl  wrote:


I would like to produce the attached graph (graph1) with the R package
agricolae, could someone give me an example with the attached data (data)?

I expect an adapted graph (graph2) with the data (data)

Best regards
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


--
Dr. Benjamin Bolker
Professor, Mathematics & Statistics and Biology, McMaster University
Director, School of Computational Science and Engineering
(Acting) Graduate chair, Mathematics & Statistics
> E-mail is sent at my convenience; I don't expect replies outside of 
working hours.


__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph in R with grouping letters from the turkey test with agricolae package

2023-09-13 Thread Richard O'Keefe
> d <- read.table("data.txt", TRUE)
> cor(d[, 3:6])
 VAR1 VAR2 VAR3 VAR4
VAR11111
VAR21111
VAR31111
VAR41111

VAR1 to VAR4 are, up to linear scaling,
exactly the same variable.  Why is that?


On Wed, 13 Sept 2023 at 07:38, Loop Vinyl  wrote:

> I would like to produce the attached graph (graph1) with the R package
> agricolae, could someone give me an example with the attached data (data)?
>
> I expect an adapted graph (graph2) with the data (data)
>
> Best regards
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph in R with grouping letters from the turkey test with agricolae package

2023-09-12 Thread Rui Barradas

Às 16:24 de 12/09/2023, Loop Vinyl escreveu:

I would like to produce the attached graph (graph1) with the R package
agricolae, could someone give me an example with the attached data (data)?

I expect an adapted graph (graph2) with the data (data)

Best regards


__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Hello,

There are no attached graphs, only data.
Can you post the code have you tried?

Hope this helps,

Rui Barradas

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph f(x) = 1/x

2017-09-19 Thread ruipbarradas

Hello,

I believe that the easiest way is

curve(1/x, -5, 5)

Also, you're missing a '-' in y < 1/x, it should be y <- 1/x

Hope this helps,

Rui Barradas



Citando AbouEl-Makarim Aboueissa :


Dear All: good morning

I am trying to graph the function y=f(x)=1/x over the interval (-5,5). But
I am getting an error message. Please see below.

I am getting the error message: *Error in xy.coords(x, y, xlabel, ylabel,
log) : *
*  'x' and 'y' lengths differ*


x

x <- seq(-5, 5, 0.01)
y < 1/x

plot(x,y, type='l', xlim=c(-5, 5), ylim=c(-5, 5), xlab = "x", ylab = "f(x)
= 1/x", lwd = 2, col ="red")

abline(h=0, lty=2, col = "blue")
abline(v=0, lty=2, col = "blue")
axis(1)
axis(2)
title(main="The Graph of f(x) = 1/x")


any help will be highly appreciated.


with thanks
abou
__
AbouEl-Makarim Aboueissa, PhD
Professor of Statistics
Department of Mathematics and Statistics
University of Southern Maine

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph f(x) = 1/x

2017-09-19 Thread Ivan Calandra
It's always good to start a new session when you don't understand what's 
wrong, because sometimes your code is correct, but you use old data 
without knowing it :)


Ivan

--
Dr. Ivan Calandra
TraCEr, Laboratory for Traceology and Controlled Experiments
MONREPOS Archaeological Research Centre and
Museum for Human Behavioural Evolution
Schloss Monrepos
56567 Neuwied, Germany
+49 (0) 2631 9772-243
https://www.researchgate.net/profile/Ivan_Calandra

On 19/09/2017 10:19, AbouEl-Makarim Aboueissa wrote:

Dear Zeileis:

Thank you very much

abou

On Tue, Sep 19, 2017 at 4:13 AM, Achim Zeileis 
wrote:



On Tue, 19 Sep 2017, AbouEl-Makarim Aboueissa wrote:

Dear All: good morning

I am trying to graph the function y=f(x)=1/x over the interval (-5,5). But
I am getting an error message. Please see below.

I am getting the error message: *Error in xy.coords(x, y, xlabel, ylabel,
log) : *
*  'x' and 'y' lengths differ*


You have "y < 1/x" rather than "y <- 1/x"! So "y" is not assigned and
presumably you have some old "y" variable in your global environment that
is used and does not match the length of "x".



x

x <- seq(-5, 5, 0.01)
y < 1/x

plot(x,y, type='l', xlim=c(-5, 5), ylim=c(-5, 5), xlab = "x", ylab = "f(x)
= 1/x", lwd = 2, col ="red")

abline(h=0, lty=2, col = "blue")
abline(v=0, lty=2, col = "blue")
axis(1)
axis(2)
title(main="The Graph of f(x) = 1/x")


any help will be highly appreciated.


with thanks
abou
__
AbouEl-Makarim Aboueissa, PhD
Professor of Statistics
Department of Mathematics and Statistics
University of Southern Maine

 [[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posti
ng-guide.html
and provide commented, minimal, self-contained, reproducible code.






__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph f(x) = 1/x

2017-09-19 Thread AbouEl-Makarim Aboueissa
Dear Zeileis:

Thank you very much

abou

On Tue, Sep 19, 2017 at 4:13 AM, Achim Zeileis 
wrote:

>
>
> On Tue, 19 Sep 2017, AbouEl-Makarim Aboueissa wrote:
>
> Dear All: good morning
>>
>> I am trying to graph the function y=f(x)=1/x over the interval (-5,5). But
>> I am getting an error message. Please see below.
>>
>> I am getting the error message: *Error in xy.coords(x, y, xlabel, ylabel,
>> log) : *
>> *  'x' and 'y' lengths differ*
>>
>
> You have "y < 1/x" rather than "y <- 1/x"! So "y" is not assigned and
> presumably you have some old "y" variable in your global environment that
> is used and does not match the length of "x".
>
>
>> x
>>
>> x <- seq(-5, 5, 0.01)
>> y < 1/x
>>
>> plot(x,y, type='l', xlim=c(-5, 5), ylim=c(-5, 5), xlab = "x", ylab = "f(x)
>> = 1/x", lwd = 2, col ="red")
>>
>> abline(h=0, lty=2, col = "blue")
>> abline(v=0, lty=2, col = "blue")
>> axis(1)
>> axis(2)
>> title(main="The Graph of f(x) = 1/x")
>>
>>
>> any help will be highly appreciated.
>>
>>
>> with thanks
>> abou
>> __
>> AbouEl-Makarim Aboueissa, PhD
>> Professor of Statistics
>> Department of Mathematics and Statistics
>> University of Southern Maine
>>
>> [[alternative HTML version deleted]]
>>
>> __
>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posti
>> ng-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>>


-- 
__
AbouEl-Makarim Aboueissa, PhD
Professor of Statistics
Department of Mathematics and Statistics
University of Southern Maine

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph f(x) = 1/x

2017-09-19 Thread Achim Zeileis



On Tue, 19 Sep 2017, AbouEl-Makarim Aboueissa wrote:


Dear All: good morning

I am trying to graph the function y=f(x)=1/x over the interval (-5,5). But
I am getting an error message. Please see below.

I am getting the error message: *Error in xy.coords(x, y, xlabel, ylabel,
log) : *
*  'x' and 'y' lengths differ*


You have "y < 1/x" rather than "y <- 1/x"! So "y" is not assigned and 
presumably you have some old "y" variable in your global environment that 
is used and does not match the length of "x".




x

x <- seq(-5, 5, 0.01)
y < 1/x

plot(x,y, type='l', xlim=c(-5, 5), ylim=c(-5, 5), xlab = "x", ylab = "f(x)
= 1/x", lwd = 2, col ="red")

abline(h=0, lty=2, col = "blue")
abline(v=0, lty=2, col = "blue")
axis(1)
axis(2)
title(main="The Graph of f(x) = 1/x")


any help will be highly appreciated.


with thanks
abou
__
AbouEl-Makarim Aboueissa, PhD
Professor of Statistics
Department of Mathematics and Statistics
University of Southern Maine

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph and Compare Distributions

2017-02-18 Thread Jeff Newmiller
Please post your code. Read the Posting Guide, which points out that you need 
to put the code in the body of your email and make sure the email is sent in 
plain text format (a setting in your mail software).

This is not a "do your work for you" mailing list. 
-- 
Sent from my phone. Please excuse my brevity.

On February 18, 2017 8:21:39 AM PST, Vasilis Bardakos  
wrote:
>Dear Sirs,
>I'm trying to demonstrate and compare my data first digit distributions
>in comparison with benford's law, but I cannot figure out how do a
>correct ggplot histogram. plot() works fine though.
>The data are the following (probabilities):
>[1] 0.37101911 0.17515924 0.08917197 0.08121019 0.06210191 0.06050955
>0.07484076 0.03662420 0.04936306
>[2] 0.524419536 0.253002402 0.092073659 0.032826261 0.025620496
>0.019215372 0.008807046 0.012009608 0.032025620
>
>These are my data first digit probabilities, while below there is the
>original distribution which would be represented with a smooth line:
>[3] 0.30103000 0.17609126 0.12493874 0.09691001 0.07918125 0.06694679
>0.05799195 0.05115252 0.04575749
>
>Kind Regards,V. Bardakos
>   [[alternative HTML version deleted]]
>
>__
>R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph together 4 series after HP filter

2016-09-06 Thread Giorgio Garziano
Hi Sebastian,

here are examples with ggplot2 and basic graphic.

http://stackoverflow.com/questions/3777174/plotting-two-variables-as-lines-using-ggplot2-on-the-same-graph

http://stackoverflow.com/questions/17150183/r-plot-multiple-lines-in-one-graph


You may also impress your audience by using iterative graphs as provided by 
dygraphs package.

https://blog.rstudio.org/2015/04/14/interactive-time-series-with-dygraphs/

You have to convert your xts objects starting from your ts ones.

An example:

getSymbols("AAPL", src = "yahoo", from = as.Date("2013-07-01"), to = 
as.Date("2016-06-30"))
getSymbols("YHOO", src = "yahoo", from = as.Date("2013-07-01"), to = 
as.Date("2016-06-30"))
getSymbols("CPHD", src = "yahoo", from = as.Date("2013-07-01"), to = 
as.Date("2016-06-30"))
getSymbols("EMC", src = "yahoo", from = as.Date("2013-07-01"), to = 
as.Date("2016-06-30"))
AAPL.xts <- Ad(AAPL)
YHOO.xts <- Ad(YHOO)
CPHD.xts <- Ad(CPHD)
EMC.xts <- Ad(EMC)

df <- data.frame(AAPL.xts, YHOO.xts, CPHD.xts, EMC.xts)
head(df)

library(dygraphs)
dygraph(df)

--

Best,

GG





[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph together 4 series after HP filter

2016-09-06 Thread Bert Gunter
?lines
?points

to add to an existing base graphics graph. There are other ways to do
this in the other graph systems (ggplot, lattice,...) used in R.

Cheers,
Bert
Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Tue, Sep 6, 2016 at 6:40 AM, Sebastian Kruk  wrote:
> Dear R-users:
>
> Let's see if you can help.
>
> I have an matrix of class "ts" of 100 rows by 4 columns which called PP.
>
> In each column I have the time series of quarterly GDP from 4 countries.
>
> They applied the Hodrick -Prescott filter and now I want to plot
> simultaneously cyclical component of the 4 countries and another window
> graphed together the trend conponentes .
>
> #If PP include the series of one country would do:
> lambda <- 1600
> DFIL <- hpfilter (PP, freq = lambda, type = "lambda" )
> #First graph
> plot(DFIL$x, plot.type = "single" col = 1:Countries , main = "Economy and
> Trend" )
> #Second graphic
> plot(DFIL$cycle, plot.type = "single" col = 1:Countries, main = "Cycle" )
> #A Deactivate the two graphics
> pair(mfrow = c (1,1))
>
> But I want to put on each graph window all the components'series.
>
> Then I made first:
> DFIL <- apply ( PP , 2, hpfilter , freq = lambda, type = "lambda" )
> How can I graph all cyclical components together?
>
> Regards,
>
> Sebastian.
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph: horizontal bar reflecting number of data

2016-07-15 Thread Dagmar

Ron: That was exactly what I was looking for!

Thank you Ron!

Also thanks to Ulrik and Jim who tried to help. I learned a lot!

Dagmar


Am 15.07.2016 um 12:48 schrieb Crump, Ron:

Hi Dagmar,


I want the names of the weeks on the x axis and the animals on the y-axis.

Then, the shading of the barplot is supposed to represent the number of
data
per week.



If I understand the above correctly, and using the example dataset
constructed by Ulrik:

datframe <- data.frame(Name=c("Kati","Kati","Kati","Leon","Leon","Leon"
+ ), week =c("1","2", "3", "1","2", "3"), numberdata =c(5,12, 1,
+ 6,2, 5))

I think this might do the job:

library(ggplot)
ggplot(datframe)+geom_tile(aes(x=week,y=Name,fill=numberdata))


Regards,
Ron.




__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph: horizontal bar reflecting number of data

2016-07-15 Thread Crump, Ron
Hi Dagmar,


I want the names of the weeks on the x axis and the animals on the y-axis.

Then, the shading of the barplot is supposed to represent the number of
data
per week.



If I understand the above correctly, and using the example dataset
constructed by Ulrik:

datframe <- data.frame(Name=c("Kati","Kati","Kati","Leon","Leon","Leon"
+ ), week =c("1","2", "3", "1","2", "3"), numberdata =c(5,12, 1,
+ 6,2, 5))

I think this might do the job:

library(ggplot)
ggplot(datframe)+geom_tile(aes(x=week,y=Name,fill=numberdata))


Regards,
Ron.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph: horizontal bar reflecting number of data

2016-07-15 Thread Jim Lemon
Hi Dagmar,
Maybe your want something like this?

datframe<-data.frame(Name=c("Kati","Kati","Kati","Leon","Leon","Leon" ),
 week =c("1","2", "3", "1","2", "3"),
 numberdata =c("5","12", "1", "6","2", "5"))
datframe
datframe$numberdata<-as.numeric(as.character(datframe$numberdat))
library(plotrix)
barcol<-color.scale(datframe$numberdat,extremes=c("blue","red"))
barpos<-barplot(matrix(datframe$numberdat,nrow=2,byrow=TRUE),
  beside=TRUE,names.arg=paste("Week",1:3),ylim=c(0,13),
  col=matrix(barcol,nrow=2,byrow=TRUE))
barlabels(barpos,matrix(datframe$numberdat,nrow=2,byrow=TRUE))
barlabels(barpos,matrix(datframe$numberdat+0.4,nrow=2,byrow=TRUE),
 labels=rep(c("Kati","Leon"),3),prop=1)

I don't see any other way to put the names on the y-axis that makes any sense.

Jim


On Fri, Jul 15, 2016 at 5:14 PM, Dagmar  wrote:
> Dear all, dear Jim,
>
> Thank you for trying to help Jim. Unfortunately it didn't solve my problem.
>
> I want the names of the weeks on the x axis and the animals on the y-axis.
>
> Then, the shading of the barplot is supposed to represent the number of data
> per week.
>
> Any help?
>
> Dagmar
>
>
> Am 13.07.2016 um 13:58 schrieb Jim Lemon:
>>
>> datframe$numberdata<-as.numeric(as.character(datframe$numberdat))
>> library(plotrix)
>> barcol<-color.scale(datframe$numberdat,extremes=c("black","white"))
>> barplot(matrix(datframe$numberdat,nrow=2,byrow=TRUE),
>>   beside=TRUE, horiz=TRUE,names.arg=paste("Week",1:3),
>>   col=matrix(barcol,nrow=2,byrow=TRUE))
>
>

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph: horizontal bar reflecting number of data

2016-07-15 Thread Ulrik Stervbo
Dear Dagmar,

must the numberdata be character?

Here are tew solutions. The first solution summarise before plotting and
the second does everything in the plot

library("dplyr")
library("ggplot2")
datframe <- data.frame(Name=c("Kati","Kati","Kati","Leon","Leon","Leon"
), week =c("1","2", "3", "1","2", "3"), numberdata =c(5,12, 1,
6,2, 5))

datframe %>% group_by(week) %>% summarise(numberdata.sum = sum(numberdata))
%>%
ggplot() +
aes(x = week, y = numberdata.sum) +
geom_bar(stat = "identity")

ggplot(datframe) +
aes(x = week, y = ..count.., weights = numberdata) +
geom_bar()

Hope this helps
Ulrik

On Fri, 15 Jul 2016 at 09:18 Dagmar  wrote:

> Dear all, dear Jim,
>
> Thank you for trying to help Jim. Unfortunately it didn't solve my problem.
>
> I want the names of the weeks on the x axis and the animals on the y-axis.
>
> Then, the shading of the barplot is supposed to represent the number of
> data per week.
>
> Any help?
>
> Dagmar
>
>
> Am 13.07.2016 um 13:58 schrieb Jim Lemon:
> > datframe$numberdata<-as.numeric(as.character(datframe$numberdat))
> > library(plotrix)
> > barcol<-color.scale(datframe$numberdat,extremes=c("black","white"))
> > barplot(matrix(datframe$numberdat,nrow=2,byrow=TRUE),
> >   beside=TRUE, horiz=TRUE,names.arg=paste("Week",1:3),
> >   col=matrix(barcol,nrow=2,byrow=TRUE))
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph: horizontal bar reflecting number of data

2016-07-15 Thread Dagmar

Dear all, dear Jim,

Thank you for trying to help Jim. Unfortunately it didn't solve my problem.

I want the names of the weeks on the x axis and the animals on the y-axis.

Then, the shading of the barplot is supposed to represent the number of 
data per week.


Any help?

Dagmar


Am 13.07.2016 um 13:58 schrieb Jim Lemon:

datframe$numberdata<-as.numeric(as.character(datframe$numberdat))
library(plotrix)
barcol<-color.scale(datframe$numberdat,extremes=c("black","white"))
barplot(matrix(datframe$numberdat,nrow=2,byrow=TRUE),
  beside=TRUE, horiz=TRUE,names.arg=paste("Week",1:3),
  col=matrix(barcol,nrow=2,byrow=TRUE))


__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph: horizontal bar reflecting number of data

2016-07-13 Thread Jim Lemon
Hi Tagmarie,
This might help:

datframe$numberdata<-as.numeric(as.character(datframe$numberdat))
library(plotrix)
barcol<-color.scale(datframe$numberdat,extremes=c("black","white"))
barplot(matrix(datframe$numberdat,nrow=2,byrow=TRUE),
 beside=TRUE, horiz=TRUE,names.arg=paste("Week",1:3),
 col=matrix(barcol,nrow=2,byrow=TRUE))

Jim


On Wed, Jul 13, 2016 at 5:59 PM, Dagmar  wrote:
> Dear all,
>
> I hope someone can help with my problem:
>
> I have a dataframe like this:
>
> datframe <- data.frame(Name=c("Kati","Kati","Kati","Leon","Leon","Leon" ),
> week =c("1","2", "3", "1","2", "3"), numberdata =c("5","12", "1", "6","2",
> "5"))
> datframe
>
> I want to create a graph like the attached one (jpg). I can't bring the bars
> to  line up by week... desperating.
>
> (in case you don't see the jpg: I want a horizontal bar which reflects the
> number of data per week by the colour of the shading).
>
> Can anyone help?
>
> Tagmarie
>
>
>
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph with ggplot2.

2015-03-25 Thread JLucke
ylim(0%,100%) is not valild.  It should be ylim(0,100).



Jeff Newmiller  
Sent by: "R-help" 
03/25/2015 11:14 AM

To
"BenedettaB24 ." , "r-help@r-project.org" 
, 
cc

Subject
Re: [R] Graph with ggplot2.






It is difficult to read your code because the HTML format messes it up, 
but I think your ggplot function call is missing a parenthesis between 
fill=Prostate and the + sign.
---
Jeff NewmillerThe .   .  Go 
Live...
DCN:Basics: ##.#.   ##.#.  Live 
Go...
  Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/BatteriesO.O#.   #.O#.  with
/Software/Embedded Controllers)   .OO#.   .OO#. rocks...1k
--- 

Sent from my phone. Please excuse my brevity.

On March 25, 2015 7:02:50 AM PDT, "BenedettaB24 ." 
 wrote:
>Dear all,
>
>I want to run ggplot2 in one of my file.
>I do this:
>
>mergefile<- read.csv("path of my file/name.csv")
>
>library(ggplot2)   to import my library
>
>ggplot(percent, aes(x=factor(Cell.lines), y=Percentage, vjust=-0.5,
>fill=Prostate )) + geom_bar(colour="black", stat="identity",
>position=position_dodge(), size=.3)+ylim(0%,100%)+xlab("Prostate cell
>lines")+ylab("Percentage of overlapping")+ggtitle("Comparison between
>cell lines against the prostate cancer lines from DNase
>esperiment")+theme_bw()+theme(axis.text.x=element_text(angle = 90,
>vjust = 0.5))
>
>i used this command three times, but now is not working, the error
>reported
>is:
>
>Error: unexpected ')' in "ggplot(percent, aes(x=factor(Cell.lines),
>y=Percentage, vjust=-0.5, fill=Prostate )) + geom_bar(colour="black",
>stat="identity", position=position_dodge(), size=.3)+ylim(0%,100%)"
>
>
>Can some one help me? any suggestions?
>
>Thanks a lot!
>
>Best regards, Benedetta
>
>[[alternative HTML version deleted]]
>
>__
>R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide 
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph with ggplot2.

2015-03-25 Thread Thierry Onkelinx
You need to define limits as defined in the data. ylim(0, 1) instead of
ylim(0%, 100%)

ylim(0%, 100%) is incorrect R syntax.

ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium

To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey

2015-03-25 15:02 GMT+01:00 BenedettaB24 . :

> Dear all,
>
> I want to run ggplot2 in one of my file.
> I do this:
>
> mergefile<- read.csv("path of my file/name.csv")
>
> library(ggplot2)   to import my library
>
> ggplot(percent, aes(x=factor(Cell.lines), y=Percentage, vjust=-0.5,
> fill=Prostate )) + geom_bar(colour="black", stat="identity",
> position=position_dodge(), size=.3)+ylim(0%,100%)+xlab("Prostate cell
> lines")+ylab("Percentage of overlapping")+ggtitle("Comparison between
> cell lines against the prostate cancer lines from DNase
> esperiment")+theme_bw()+theme(axis.text.x=element_text(angle = 90,
> vjust = 0.5))
>
> i used this command three times, but now is not working, the error reported
> is:
>
> Error: unexpected ')' in "ggplot(percent, aes(x=factor(Cell.lines),
> y=Percentage, vjust=-0.5, fill=Prostate )) + geom_bar(colour="black",
> stat="identity", position=position_dodge(), size=.3)+ylim(0%,100%)"
>
>
> Can some one help me? any suggestions?
>
> Thanks a lot!
>
> Best regards, Benedetta
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph with ggplot2.

2015-03-25 Thread S Ellison
> i used this command three times, 
clearly not exactly this, if it's stopped working ...

> but now is not working, the error reported is:
> Error: unexpected ')' in "ggplot(percent, aes(x=factor(Cell.lines), 
> y=Percentage,
> vjust=-0.5, fill=Prostate )) + geom_bar(colour="black", stat="identity",
> position=position_dodge(), size=.3)+ylim(0%,100%)"
> 
> 
> Can some one help me? any suggestions?

You have an unexpected right parenthesis at 100%). Look for something wrong 
there or before that - often an unmatched parenthesis, string terminator or 
operator terminator - would be sensible.

As a clue, you could think about what '%' means in R. It does NOT mean 'percent'

S Ellison


***
This email and any attachments are confidential. Any use...{{dropped:8}}

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph with ggplot2.

2015-03-25 Thread Jeff Newmiller
It is difficult to read your code because the HTML format messes it up, but I 
think your ggplot function call is missing a parenthesis between fill=Prostate 
and the + sign.
---
Jeff NewmillerThe .   .  Go Live...
DCN:Basics: ##.#.   ##.#.  Live Go...
  Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/BatteriesO.O#.   #.O#.  with
/Software/Embedded Controllers)   .OO#.   .OO#.  rocks...1k
--- 
Sent from my phone. Please excuse my brevity.

On March 25, 2015 7:02:50 AM PDT, "BenedettaB24 ." 
 wrote:
>Dear all,
>
>I want to run ggplot2 in one of my file.
>I do this:
>
>mergefile<- read.csv("path of my file/name.csv")
>
>library(ggplot2)   to import my library
>
>ggplot(percent, aes(x=factor(Cell.lines), y=Percentage, vjust=-0.5,
>fill=Prostate )) + geom_bar(colour="black", stat="identity",
>position=position_dodge(), size=.3)+ylim(0%,100%)+xlab("Prostate cell
>lines")+ylab("Percentage of overlapping")+ggtitle("Comparison between
>cell lines against the prostate cancer lines from DNase
>esperiment")+theme_bw()+theme(axis.text.x=element_text(angle = 90,
>vjust = 0.5))
>
>i used this command three times, but now is not working, the error
>reported
>is:
>
>Error: unexpected ')' in "ggplot(percent, aes(x=factor(Cell.lines),
>y=Percentage, vjust=-0.5, fill=Prostate )) + geom_bar(colour="black",
>stat="identity", position=position_dodge(), size=.3)+ylim(0%,100%)"
>
>
>Can some one help me? any suggestions?
>
>Thanks a lot!
>
>Best regards, Benedetta
>
>   [[alternative HTML version deleted]]
>
>__
>R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph

2014-06-27 Thread Greg Snow
Or

densityplot(~mu, dat, group=gp, auto.key=TRUE)

which will be more like the matplot result.

On Thu, Jun 26, 2014 at 6:46 PM, Duncan Mackay  wrote:
> As Greg has listed lattice
>
> Here are ways in lattice
>
> quick 1 panel
> library(lattice)
> densityplot(~ mu1+mu2+mu3+mu4)
>
> dat = data.frame(mu = c(mu1,mu2,mu3,mu4), gp = rep(1:4,
> sapply(list(mu1,mu2,mu3,mu4), length)) )
> densityplot(~ mu|gp, data = dat)
> densityplot(~ mu|gp, dat, pch = "|")
>
> see
> ?xyplot
> ?panel.densityplot
>
> Duncan
>
> Duncan Mackay
> Department of Agronomy and Soil Science
> University of New England
> Armidale NSW 2351
> Email: home: mac...@northnet.com.au
>
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
> Behalf Of IZHAK shabsogh
> Sent: Thursday, 26 June 2014 16:47
> To: r-help@r-project.org
> Subject: [R] graph
>
> kindly guide me on how i can plot the following data on the same graph using
> the kernel density. i will like to use as to compare performance
>
> mu1<-c(500.0035, 501.2213, 500.7532, 500.2622, 500.3391, 500.1618, 499.9511,
> 500.1843, 499.8945, 499.8467)
> mu2<-c(498.9623, 504.7938, 506.8957, 495.6634, 506.2751, 503.4344, 503.9103,
> 512.3021,492.3065, 500.8908)
> mu3<-c(498.9352, 501.3470, 506.7885, 497.3446, 505.6911, 500., 503.9103,
> 512.0994,492.3065, 500.0001)
> mu4<-c(498.5626, 501.3469, 506.7781, 497.3466, 505.6723, 500., 503.9103,
> 512.0936,492.3065, 500.)
>
>
> thanks
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



-- 
Gregory (Greg) L. Snow Ph.D.
538...@gmail.com

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph

2014-06-26 Thread Duncan Mackay
As Greg has listed lattice

Here are ways in lattice 

quick 1 panel
library(lattice)
densityplot(~ mu1+mu2+mu3+mu4)

dat = data.frame(mu = c(mu1,mu2,mu3,mu4), gp = rep(1:4,
sapply(list(mu1,mu2,mu3,mu4), length)) )
densityplot(~ mu|gp, data = dat)
densityplot(~ mu|gp, dat, pch = "|")

see
?xyplot
?panel.densityplot

Duncan

Duncan Mackay
Department of Agronomy and Soil Science
University of New England
Armidale NSW 2351
Email: home: mac...@northnet.com.au

-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of IZHAK shabsogh
Sent: Thursday, 26 June 2014 16:47
To: r-help@r-project.org
Subject: [R] graph

kindly guide me on how i can plot the following data on the same graph using
the kernel density. i will like to use as to compare performance

mu1<-c(500.0035, 501.2213, 500.7532, 500.2622, 500.3391, 500.1618, 499.9511,
500.1843, 499.8945, 499.8467)
mu2<-c(498.9623, 504.7938, 506.8957, 495.6634, 506.2751, 503.4344, 503.9103,
512.3021,492.3065, 500.8908)
mu3<-c(498.9352, 501.3470, 506.7885, 497.3446, 505.6911, 500., 503.9103,
512.0994,492.3065, 500.0001)
mu4<-c(498.5626, 501.3469, 506.7781, 497.3466, 505.6723, 500., 503.9103,
512.0936,492.3065, 500.)
 

thanks
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph

2014-06-26 Thread Greg Snow
Does this do what you want?

d1 <- density(mu1)
d2 <- density(mu2)
d3 <- density(mu3)
d4 <- density(mu4)

matplot( cbind( d1$x, d2$x, d3$x, d4$x ), cbind( d1$y, d2$y, d3$y,
d4$y ), type='l')

Or in a more expandable way:

mus <- mget( ls(pat='^mu') )
ds <- lapply( mus, density )
xs <- sapply( ds, `[[`, "x" )
ys <- sapply( ds, `[[`, "y" )
matplot(xs,ys, type='l')

You could also combine the data into a single data frame and use
lattice or ggplot2 tools to create a similar graph.


If not, then please give more details on what you want, what the graph
should look like, what you have tried and how it differs from what you
want.


On Thu, Jun 26, 2014 at 12:47 AM, IZHAK shabsogh  wrote:
> kindly guide me on how i can plot the following data on the same graph using 
> the kernel density. i will like to use as to compare performance
>
> mu1<-c(500.0035, 501.2213, 500.7532, 500.2622, 500.3391, 500.1618, 499.9511, 
> 500.1843, 499.8945, 499.8467)
> mu2<-c(498.9623, 504.7938, 506.8957, 495.6634, 506.2751, 503.4344, 503.9103, 
> 512.3021,492.3065, 500.8908)
> mu3<-c(498.9352, 501.3470, 506.7885, 497.3446, 505.6911, 500., 503.9103, 
> 512.0994,492.3065, 500.0001)
> mu4<-c(498.5626, 501.3469, 506.7781, 497.3466, 505.6723, 500., 503.9103, 
> 512.0936,492.3065, 500.)
>
>
> thanks
> [[alternative HTML version deleted]]
>
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Gregory (Greg) L. Snow Ph.D.
538...@gmail.com

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph

2014-06-26 Thread David L Carlson
You can do it, but mu1 has a much smaller variance and mu3 and mu4 are almost 
identical so they overplot.

> xy1 <- density(mu1)
> xy2 <- density(mu2)
> xy3 <- density(mu3)
> xy4 <- density(mu4)
> Density <- cbind(xy1$y, xy2$y, xy3$y, xy4$y)
> x <- cbind(xy1$x, xy2$x, xy3$x, xy4$x)
> matplot(x, Density, type="l")
> legend("topright", c("mu1", "mu2", "mu3", "mu4"), col=1:4, lty=1:4)

-
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77840-4352

-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On 
Behalf Of IZHAK shabsogh
Sent: Thursday, June 26, 2014 1:47 AM
To: r-help@r-project.org
Subject: [R] graph

kindly guide me on how i can plot the following data on the same graph using 
the kernel density. i will like to use as to compare performance

mu1<-c(500.0035, 501.2213, 500.7532, 500.2622, 500.3391, 500.1618, 499.9511, 
500.1843, 499.8945, 499.8467)
mu2<-c(498.9623, 504.7938, 506.8957, 495.6634, 506.2751, 503.4344, 503.9103, 
512.3021,492.3065, 500.8908)
mu3<-c(498.9352, 501.3470, 506.7885, 497.3446, 505.6911, 500., 503.9103, 
512.0994,492.3065, 500.0001)
mu4<-c(498.5626, 501.3469, 506.7781, 497.3466, 505.6723, 500., 503.9103, 
512.0936,492.3065, 500.)
 

thanks
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph densification in large networks

2014-03-10 Thread Rui Barradas

Hello,

Take a look at package igraph.

Hope this helps,

Rui Barradas

Em 10-03-2014 12:30, Lietz, Haiko escreveu:

I didn't remember Leskovec et al.'s work correctly. They don't compute the 
number of new nodes and new edges per unit time but just the number of nodes 
and edges. This makes it a lot easier.

But nevertheless, if I wanted to compute the number of new edges - what package 
would I use for large (and not necessarily sparse) graphs?

Haiko


-Ursprüngliche Nachricht-
Von: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Im 
Auftrag von Lietz, Haiko
Gesendet: Montag, 10. März 2014 10:34
An: r-help@r-project.org
Betreff: [R] Graph densification in large networks

Hi all,

I have dynamic large 2-mode networks (1st mode ~50k nodes, 2nd mode ~500k 
nodes, timepoints ~100).

I want to identify the number of new nodes and new edges per timepoint in 
folded 1-mode networks.

In other words, I want to do measure graph densification as proposed by Leskovec et al. 
(http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.262.3092&rep=rep1&type=pdf)

What package should I use?

Best wishes

Haiko


Haiko Lietz
GESIS - Leibniz Institute for the Social Sciences
Department of Computational Social Science
Unter Sachsenhausen 6-8, D-50667 Köln
Tel: + 49 (0) 221 / 476 94 -223
eMail: haiko.li...@gesis.org
Web: http://www.gesis.org


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph densification in large networks

2014-03-10 Thread Lietz, Haiko
I didn't remember Leskovec et al.'s work correctly. They don't compute the 
number of new nodes and new edges per unit time but just the number of nodes 
and edges. This makes it a lot easier.

But nevertheless, if I wanted to compute the number of new edges - what package 
would I use for large (and not necessarily sparse) graphs?

Haiko
 

-Ursprüngliche Nachricht-
Von: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Im 
Auftrag von Lietz, Haiko
Gesendet: Montag, 10. März 2014 10:34
An: r-help@r-project.org
Betreff: [R] Graph densification in large networks

Hi all,

I have dynamic large 2-mode networks (1st mode ~50k nodes, 2nd mode ~500k 
nodes, timepoints ~100).

I want to identify the number of new nodes and new edges per timepoint in 
folded 1-mode networks.

In other words, I want to do measure graph densification as proposed by 
Leskovec et al. 
(http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.262.3092&rep=rep1&type=pdf)

What package should I use?

Best wishes

Haiko


Haiko Lietz
GESIS - Leibniz Institute for the Social Sciences
Department of Computational Social Science
Unter Sachsenhausen 6-8, D-50667 Köln
Tel: + 49 (0) 221 / 476 94 -223
eMail: haiko.li...@gesis.org
Web: http://www.gesis.org


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph is without line

2013-09-25 Thread PIKAL Petr
Hi

It is mostly question of personal preference. Factors have some nice features 
when manipulating with levels, sorting, and/or using numeric annotation. 
However when you want to add some new value to factor it is trickier than with 
plain string vectors. Maybe it is time to look into R-intro explanation of 
object differences. 

Petr

> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of mohan.radhakrish...@polarisft.com
> Sent: Wednesday, September 25, 2013 6:13 AM
> To: Jim Lemon
> Cc: r-help@r-project.org
> Subject: Re: [R] Graph is without line
> 
> Hi,
>  Yes. It worked. Is 'stringAsFactors=FALSE' the switch to
> use when reading data into a frame ? All the values I use are either
> numbers or dates or strings. Sometimes while I manipulate the data by
> filtering, the values seem to become factors ?
> 
> Thanks,
> Mohan
> 
> 
> 
> From:   Jim Lemon 
> To: mohan.radhakrish...@polarisft.com
> Cc:     r-help@r-project.org
> Date:   09/25/2013 05:56 AM
> Subject:Re: [R] Graph is without line
> 
> 
> 
> On 09/24/2013 10:46 PM, mohan.radhakrish...@polarisft.com wrote:
> > Hi,
> >  Sometimes I get a graph like the attached one. The data type
> could
> > have something to do with it. This graph does not use the color and
> > does not draw a line. Earlier I used to convert the factors in the
> > data frame to
> another
> > data type and drew the correct graphs.
> >
> > Any idea why this happens ?
> >
> > Thanks,
> > Mohan
> >
> >  Var1 Freq
> > 1 10.1.17.10  205
> > 2 10.1.17.15  216
> > 3 10.1.17.17   79
> > 4 10.1.17.23   76
> > 5 10.1.17.24  209
> > 6  10.1.17.5  244
> > 7  10.1.17.6  178
> > 8  10.1.17.7  165
> > 9  10.1.17.8  146
> >
> >
> >
> > #prints factor
> > print(class(data$Var1))
> >
> >
> plot(data$Var1,data$Freq,ylim=c(0,700),col="green",type="o",ylab="",xla
> b="",las=2,lwd=2.5,xaxt="n")
> > title("Estimation of concurrent connections",cex.main=3)
> > library(plotrix)
> > staxlab(at=data$Var1,
> >labels=as.character(data$Var1),nlines=3,srt=90)
> >
> Hi Mohan,
> If you pass a factor as the "x" value to plot, it assumes that the
> values of the factor are nominal or at best ordinal and does not try to
> connect them into a metric scale. You can get a "line" with:
> 
> plot(as.numeric(data$Var1),data$Freq,ylim=c(0,700),col="green",type="o"
> ,
>   ylab="",xlab="",las=2,lwd=2.5,xaxt="n")
> ...
> 
> but think carefully about whether this means anything sensible.
> 
> Jim
> 
> 
> 
> 
> This e-Mail may contain proprietary and confidential information and is
> sent for the intended recipient(s) only.  If by an addressing or
> transmission error this mail has been misdirected to you, you are
> requested to delete this mail immediately. You are also hereby notified
> that any use, any form of reproduction, dissemination, copying,
> disclosure, modification, distribution and/or publication of this e-
> mail message, contents or its attachment other than by its intended
> recipient/s is strictly prohibited.
> 
> Visit us at http://www.polarisFT.com
> 
>   [[alternative HTML version deleted]]
> 
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph is without line

2013-09-24 Thread mohan . radhakrishnan
Hi,
 Yes. It worked. Is 'stringAsFactors=FALSE' the switch to use 
when reading data into a frame ? All the values I use are either numbers 
or dates or strings. Sometimes while I manipulate the data by filtering, 
the values seem to become factors ?

Thanks,
Mohan



From:   Jim Lemon 
To: mohan.radhakrish...@polarisft.com
Cc: r-help@r-project.org
Date:   09/25/2013 05:56 AM
Subject:        Re: [R] Graph is without line



On 09/24/2013 10:46 PM, mohan.radhakrish...@polarisft.com wrote:
> Hi,
>  Sometimes I get a graph like the attached one. The data type 
could
> have something to do with it. This graph does not use the color and does
> not draw
> a line. Earlier I used to convert the factors in the data frame to 
another
> data type and drew the correct graphs.
>
> Any idea why this happens ?
>
> Thanks,
> Mohan
>
>  Var1 Freq
> 1 10.1.17.10  205
> 2 10.1.17.15  216
> 3 10.1.17.17   79
> 4 10.1.17.23   76
> 5 10.1.17.24  209
> 6  10.1.17.5  244
> 7  10.1.17.6  178
> 8  10.1.17.7  165
> 9  10.1.17.8  146
>
>
>
> #prints factor
> print(class(data$Var1))
>
> 
plot(data$Var1,data$Freq,ylim=c(0,700),col="green",type="o",ylab="",xlab="",las=2,lwd=2.5,xaxt="n")
> title("Estimation of concurrent connections",cex.main=3)
> library(plotrix)
> staxlab(at=data$Var1,
>labels=as.character(data$Var1),nlines=3,srt=90)
>
Hi Mohan,
If you pass a factor as the "x" value to plot, it assumes that the 
values of the factor are nominal or at best ordinal and does not try to 
connect them into a metric scale. You can get a "line" with:

plot(as.numeric(data$Var1),data$Freq,ylim=c(0,700),col="green",type="o",
  ylab="",xlab="",las=2,lwd=2.5,xaxt="n")
...

but think carefully about whether this means anything sensible.

Jim




This e-Mail may contain proprietary and confidential information and is sent 
for the intended recipient(s) only.  If by an addressing or transmission error 
this mail has been misdirected to you, you are requested to delete this mail 
immediately. You are also hereby notified that any use, any form of 
reproduction, dissemination, copying, disclosure, modification, distribution 
and/or publication of this e-mail message, contents or its attachment other 
than by its intended recipient/s is strictly prohibited.

Visit us at http://www.polarisFT.com

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph is without line

2013-09-24 Thread Jim Lemon

On 09/24/2013 10:46 PM, mohan.radhakrish...@polarisft.com wrote:

Hi,
 Sometimes I get a graph like the attached one. The data type could
have something to do with it. This graph does not use the color and does
not draw
a line. Earlier I used to convert the factors in the data frame to another
data type and drew the correct graphs.

Any idea why this happens ?

Thanks,
Mohan

 Var1 Freq
1 10.1.17.10  205
2 10.1.17.15  216
3 10.1.17.17   79
4 10.1.17.23   76
5 10.1.17.24  209
6  10.1.17.5  244
7  10.1.17.6  178
8  10.1.17.7  165
9  10.1.17.8  146



#prints factor
print(class(data$Var1))

plot(data$Var1,data$Freq,ylim=c(0,700),col="green",type="o",ylab="",xlab="",las=2,lwd=2.5,xaxt="n")
title("Estimation of concurrent connections",cex.main=3)
library(plotrix)
staxlab(at=data$Var1,
   labels=as.character(data$Var1),nlines=3,srt=90)


Hi Mohan,
If you pass a factor as the "x" value to plot, it assumes that the 
values of the factor are nominal or at best ordinal and does not try to 
connect them into a metric scale. You can get a "line" with:


plot(as.numeric(data$Var1),data$Freq,ylim=c(0,700),col="green",type="o",
 ylab="",xlab="",las=2,lwd=2.5,xaxt="n")
...

but think carefully about whether this means anything sensible.

Jim

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph is without line

2013-09-24 Thread arun
Try:

plot(as.numeric(data$Var1),data$Freq,ylim=c(0,700),col="green",type="o",ylab="",xlab="",las=2,lwd=2.5,xaxt="n")

A.K.



- Original Message -
From: "mohan.radhakrish...@polarisft.com" 
To: r-help@r-project.org
Cc: 
Sent: Tuesday, September 24, 2013 8:46 AM
Subject: [R] Graph is without line

Hi,
        Sometimes I get a graph like the attached one. The data type could 
have something to do with it. This graph does not use the color and does 
not draw
a line. Earlier I used to convert the factors in the data frame to another 
data type and drew the correct graphs.

Any idea why this happens ?

Thanks,
Mohan

            Var1 Freq
1     10.1.17.10  205
2     10.1.17.15  216
3     10.1.17.17   79
4     10.1.17.23   76
5     10.1.17.24  209
6      10.1.17.5  244
7      10.1.17.6  178
8      10.1.17.7  165
9      10.1.17.8  146



#prints factor
print(class(data$Var1))

plot(data$Var1,data$Freq,ylim=c(0,700),col="green",type="o",ylab="",xlab="",las=2,lwd=2.5,xaxt="n")
title("Estimation of concurrent connections",cex.main=3)
library(plotrix)
staxlab(at=data$Var1,
  labels=as.character(data$Var1),nlines=3,srt=90)


This e-Mail may contain proprietary and confidential information and is sent 
for the intended recipient(s) only.  If by an addressing or transmission error 
this mail has been misdirected to you, you are requested to delete this mail 
immediately. You are also hereby notified that any use, any form of 
reproduction, dissemination, copying, disclosure, modification, distribution 
and/or publication of this e-mail message, contents or its attachment other 
than by its intended recipient/s is strictly prohibited.

Visit us at http://www.polarisFT.com

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph related question

2013-08-22 Thread David Winsemius

On Aug 22, 2013, at 4:17 PM, Jim Lemon wrote:

> On 08/23/2013 04:32 AM, Jie wrote:
>> Dear All,
>> 
>> I would like to draw a graph to illustrate the mapping between two vectors.
>> For instance,
>> a = c(2, 8, 5) ; mapped.a = c(8, 2, 5)
>> 
>> I would like to get some picture as
>> http://www.flickr.com/photos/96546690@N02/9569526581/
>> 
>> Basically, plot all points of a in a vertical line, and mapped.a in
>> another vertical line, finally link the same element by a arrow.
>> Thank you for any advice.
>> 
>> Best wishes
>> Jie
>> 
> Hi Jie,
> Try the bumpchart function in the plotrix package. This just connects the 
> points with lines. If you have to have arrows connecting the points, it would 
> not take a great deal of programming.

I think looking at (and working through) the help page for ?segments might 
provide an answer.

plot(NA, xlim=c(0,3), ylim=range(c(0,length(a)+1)) )
arrows(x0=1.05, x1=1.95,
y0=4-seq_along(a) ,y1=4-seq_along(mapped.a)[order(a)], 
col=c("red","green","orange"))
text(x=1, y=seq_along(a), labels=a )
text(x=2, y=seq_along(a), labels=mapped.a )

-- 

David Winsemius
Alameda, CA, USA

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph related question

2013-08-22 Thread Jim Lemon

On 08/23/2013 04:32 AM, Jie wrote:

Dear All,

I would like to draw a graph to illustrate the mapping between two vectors.
For instance,
a = c(2, 8, 5) ; mapped.a = c(8, 2, 5)

I would like to get some picture as
http://www.flickr.com/photos/96546690@N02/9569526581/

Basically, plot all points of a in a vertical line, and mapped.a in
another vertical line, finally link the same element by a arrow.
Thank you for any advice.

Best wishes
Jie


Hi Jie,
Try the bumpchart function in the plotrix package. This just connects 
the points with lines. If you have to have arrows connecting the points, 
it would not take a great deal of programming.


Jim

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph related question

2013-08-22 Thread David Carlson
It is not hard to create a basic function for that purpose:

map.vec <- function(x, y) {
dfa <- data.frame(a=x, x0=rep(1, length(x)),
y0=length(x):1)
dfamap <- data.frame(a=y, x1=rep(2, length(y)), 
y1=length(y):1)
vec <- merge(dfa, dfamap, by=1)
plot(c(0, 3), c(0, length(x)+1), xlab="", ylab="",
type="n", axes=FALSE)
text(1, length(x):1, as.character(x))
text(2, length(y):1, as.character(y))
arrows(vec[,2]+.05, vec[,3], vec[,4]-.05, vec[,5],
length=.15)
}

a <- c(2, 8, 5)
a.mapped <- c(8, 2, 5)
set.seed(42)
b <- sample.int(15, 10)
b.mapped <- sample(b)

map.vec(a, a.mapped)
map.vec(b, b.mapped)

-
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77840-4352

-Original Message-
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] On Behalf Of Jie
Sent: Thursday, August 22, 2013 1:33 PM
To: r-help
Subject: [R] graph related question

Dear All,

I would like to draw a graph to illustrate the mapping between
two vectors.
For instance,
a = c(2, 8, 5) ; mapped.a = c(8, 2, 5)

I would like to get some picture as
http://www.flickr.com/photos/96546690@N02/9569526581/

Basically, plot all points of a in a vertical line, and mapped.a
in
another vertical line, finally link the same element by a arrow.
Thank you for any advice.

Best wishes
Jie

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible
code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph layout

2013-03-26 Thread Uwe Ligges



On 26.03.2013 14:49, Shane Carey wrote:

Hi,

Is it possible to use par() within par()? Something like:
par(mfcol=c(2,2),mar=c(4.5,4.5,2,2))
op  <- par(las=1,xaxs="r",mai=c(1,0.75,1,1))
plot(hist(x),main="",xlim=c(0,100),xaxt="n",yaxt="n",xlab="",ylab="",border="white")
axis(1,at=c(0,20,40,60,80,100),line=-1,cex.axis=0.7,padj=-1.5)
par(new=TRUE)
y<-hist(log10(x))
par(op)

plot(sort(log10(x)))


Yes, as you can see. And now the question is?

Uwe Ligges





dev.off()

Thanks



__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph from Glantz

2013-03-06 Thread John Kane
No link and/ no attached file.  The list tends to strip most attachments to 
reduce virus attacks.  

John Kane
Kingston ON Canada


> -Original Message-
> From: angeloscozzare...@tiscali.it
> Sent: Wed, 6 Mar 2013 19:53:18 +0100
> To: r-help@r-project.org
> Subject: [R] Graph from Glantz
> 
> Hi,
> 
> I'd like to draw a graph like this one from Stanton Glantz book, Primer
> of Biostatistics.
> 
> 
> 
> 
> 
> Thanks
> 
> Angelo
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.


FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your 
desktop!

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph showing fitted values obtained by binomial GLM

2012-07-06 Thread linda.kate
Thank you Simon!

--
View this message in context: 
http://r.789695.n4.nabble.com/Graph-showing-fitted-values-obtained-by-binomial-GLM-tp4635573p4635581.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph showing fitted values obtained by binomial GLM

2012-07-05 Thread Simon Blomberg
You have size as well as time in your model M2. So your newdata (MyData) 
needs to have size in it too.


Cheers,

Simon.

On 06/07/12 13:55, linda.kate wrote:

I have completed a binomial GLM in R (details attached (finalModel.docx)) and
I am trying to create a graph of observed and fitted values using the
following commands:


MyData<-data.frame(time=seq(from=0,to=1323,by=1))
Pred<-predict(M2,newdata=MyData,type="response")
plot(x=turtle$time,y=turtle$success)
lines(MyData$time,Pred)


However, I get the following error when using the  command:


Pred<-predict(M2,newdata=MyData,type="response")

Error in eval(expr, envir, enclos) : object 'size' not found


I'm not sure why I am getting this error. I have used the same commands on a
similar dataset before and was able to produce the attached plot
(plot.docx). I've also attached the data I've been using (final.csv).

Any pointers would be greatly appreciated!!

Thank you for your time,
Linda Baker
Student - James Cook University

http://r.789695.n4.nabble.com/file/n4635573/finalModel.docx finalModel.docx
http://r.789695.n4.nabble.com/file/n4635573/plot.docx plot.docx
http://r.789695.n4.nabble.com/file/n4635573/final.csv final.csv

--
View this message in context: 
http://r.789695.n4.nabble.com/Graph-showing-fitted-values-obtained-by-binomial-GLM-tp4635573.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


--
Simon Blomberg, BSc (Hons), PhD, MAppStat, AStat.
Lecturer and Consultant Statistician
School of Biological Sciences
The University of Queensland
St. Lucia Queensland 4072
Australia
T: +61 7 3365 2506
email: S.Blomberg1_at_uq.edu.au
http://www.uq.edu.au/~uqsblomb/

Policies:
1.  I will NOT analyse your data for you.
2.  Your deadline is your problem.

Statistics is the grammar of science - Karl Pearson.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph from txt file

2012-07-01 Thread HIMANSHU MITTAL
Thanks a ton

Regards
Himanshu Mittal

On Sat, Jun 30, 2012 at 11:42 PM, Rui Barradas  wrote:

> Hello,
>
> The answer to the question is yes.
> But first a note. Your vertex ids start at 51 and the greater is 173.
> igraph vertices (and edges) are automatically numbered starting at 1, in
> this latest package version. Previous versions vertex numbers were zero
> based. If you look online you will almost surely find code with this
> previous behaviour. In your example, this means that you are creating a
> graph with 173 vertices when in fact it only has 5.
> So, I've redid the ids 1 to 5 and used your numbers as vertex labels.
>
>
> dat <- read.csv(text="
> id1,id2,label,time
> 1,2,0,315522000
> 1,2,0,315522000
> 3,4,0,315522000
> 3,5,0,415522000
> ", header=TRUE)
>
>
> vertices <- as.vector( t(dat[, 1:2]) )
> vlabels <- c(51, 66, 140, 157, 173)
>
> g <- graph(vertices, directed=FALSE)
> V(g)$label <- vlabels
> E(g)$label <- dat$label
> E(g)$time <- as.POSIXct(as.POSIXlt(dat$**time, origin="1970-01-01"))
>
> plot(g, layout=layout.circle, edge.label=E(g)$weight,
> edge.color=E(g)$color)
>
> # Finally, this is what you want.
> vert.incident <- c(1, 2)
> e <- get.edge.ids(g, vp=vert.incident, directed=FALSE)
> E(g)[e]$time
>
> If the egde doesn't exist it returns zero. So, you should test it for
> positiveness to avoid trying to index E(g) with an invalid index number.
>
>
> Hope this helps,
>
> Rui Barradas
>
> Em 30-06-2012 15:20, HIMANSHU MITTAL escreveu:
>
>> Thanks a lot.
>>
>> Just one more question.
>> me given the two node ids and the graph, can i find the corresponding
>> edge attributes( date and label)?
>>
>> On Sat, Jun 30, 2012 at 2:10 PM, Rui Barradas > > wrote:
>>
>> Hello,
>>
>> Just set the attribute,
>>
>> V(g)$date <- as.POSIXct(as.POSIXlt(rep(__**315522000, 6),
>>
>> origin="1970-01-01"))
>> V(g)$date
>>
>>
>> Rui Barradas
>>
>> Em 30-06-2012 04:26, HIMANSHU MITTAL escreveu:
>>
>> Thanks a lot.
>> But i have one more doubt
>> one of the attribute i have is time of edge formation
>>
>> id1,id2,label,time
>> 51,66,0,315522000
>> 51,66,0,315522000
>> 140,157,0,315522000
>> 140,173,0,415522000
>> so is there any attribute for storing timestamps like for weight
>> or color
>> or if i store it in color would i lose the information?
>>
>> On Sat, Jun 30, 2012 at 2:56 AM, Rui Barradas
>> mailto:ruipbarra...@sapo.pt>
>> >**>
>> wrote:
>>
>> Hello,
>>
>> Package igraph can create graphs. Example:
>>
>> dat <- read.table(text="
>> node1  node2  attr1  attr2
>> 2  1  2  3
>> 3  2  3  2
>> 4  3  4  2
>> 6  5  1  4
>> ", header=TRUE)
>> dat
>>
>> vertices <- as.vector( t(dat[, 1:2]) )
>>
>> g <- graph(vertices, directed=FALSE)
>> E(g)$weight <- dat$attr1
>> E(g)$color <- dat$attr2
>>
>> plot(g, layout=layout.circle, edge.label=E(g)$weight,
>> edge.color=E(g)$color)
>>
>>
>> Also, you should post data examples like the posting guide
>> says.
>> With your description, a small example like the one above
>> would do.
>>
>> Hope this helps,
>>
>> Rui Barradas
>>
>> Em 29-06-2012 19:05, HIMANSHU MITTAL escreveu:
>>
>> yes i would prefer igraph, but it can be any r package
>> as long
>> as it can
>> create the graph
>>
>> On Fri, Jun 29, 2012 at 11:14 PM, Peter Ehlers
>> mailto:ehl...@ucalgary.ca>
>> >> wrote:
>>
>> On 2012-06-29 10:28, HIMANSHU MITTAL wrote:
>>
>> Hi all,
>> I have a text file in which the graph info is
>> stored as:
>> node1 node2 attr1 attr2
>> where there is an edge b/w node1&2 and attr1&2
>> are edge
>> atttributes
>>
>>   is there any way to create a graph using such
>> format in r?
>>
>>
>> The igraph package?
>>
>> Peter Ehlers
>>
>>
>> Regards,
>> Himanshu Mittal
>>
>> [[alternative HTML version deleted]]
>>
>> __**
>> **
>> R-help@r-project.org 
>> >
>> mailing list
>> 
>> https://stat.ethz.ch/mailman/****listinfo/r-help

Re: [R] graph from txt file

2012-06-30 Thread Rui Barradas

Hello,

The answer to the question is yes.
But first a note. Your vertex ids start at 51 and the greater is 173. 
igraph vertices (and edges) are automatically numbered starting at 1, in 
this latest package version. Previous versions vertex numbers were zero 
based. If you look online you will almost surely find code with this 
previous behaviour. In your example, this means that you are creating a 
graph with 173 vertices when in fact it only has 5.

So, I've redid the ids 1 to 5 and used your numbers as vertex labels.


dat <- read.csv(text="
id1,id2,label,time
1,2,0,315522000
1,2,0,315522000
3,4,0,315522000
3,5,0,415522000
", header=TRUE)

vertices <- as.vector( t(dat[, 1:2]) )
vlabels <- c(51, 66, 140, 157, 173)

g <- graph(vertices, directed=FALSE)
V(g)$label <- vlabels
E(g)$label <- dat$label
E(g)$time <- as.POSIXct(as.POSIXlt(dat$time, origin="1970-01-01"))

plot(g, layout=layout.circle, edge.label=E(g)$weight, edge.color=E(g)$color)

# Finally, this is what you want.
vert.incident <- c(1, 2)
e <- get.edge.ids(g, vp=vert.incident, directed=FALSE)
E(g)[e]$time

If the egde doesn't exist it returns zero. So, you should test it for 
positiveness to avoid trying to index E(g) with an invalid index number.


Hope this helps,

Rui Barradas

Em 30-06-2012 15:20, HIMANSHU MITTAL escreveu:

Thanks a lot.
Just one more question.
me given the two node ids and the graph, can i find the corresponding
edge attributes( date and label)?

On Sat, Jun 30, 2012 at 2:10 PM, Rui Barradas mailto:ruipbarra...@sapo.pt>> wrote:

Hello,

Just set the attribute,

V(g)$date <- as.POSIXct(as.POSIXlt(rep(__315522000, 6),
origin="1970-01-01"))
V(g)$date


Rui Barradas

Em 30-06-2012 04:26, HIMANSHU MITTAL escreveu:

Thanks a lot.
But i have one more doubt
one of the attribute i have is time of edge formation

id1,id2,label,time
51,66,0,315522000
51,66,0,315522000
140,157,0,315522000
140,173,0,415522000
so is there any attribute for storing timestamps like for weight
or color
or if i store it in color would i lose the information?

On Sat, Jun 30, 2012 at 2:56 AM, Rui Barradas
mailto:ruipbarra...@sapo.pt>
>> wrote:

Hello,

Package igraph can create graphs. Example:

dat <- read.table(text="
node1  node2  attr1  attr2
2  1  2  3
3  2  3  2
4  3  4  2
6  5  1  4
", header=TRUE)
dat

vertices <- as.vector( t(dat[, 1:2]) )

g <- graph(vertices, directed=FALSE)
E(g)$weight <- dat$attr1
E(g)$color <- dat$attr2

plot(g, layout=layout.circle, edge.label=E(g)$weight,
edge.color=E(g)$color)


Also, you should post data examples like the posting guide says.
With your description, a small example like the one above
would do.

Hope this helps,

Rui Barradas

Em 29-06-2012 19:05, HIMANSHU MITTAL escreveu:

yes i would prefer igraph, but it can be any r package
as long
as it can
create the graph

On Fri, Jun 29, 2012 at 11:14 PM, Peter Ehlers
mailto:ehl...@ucalgary.ca>
>> wrote:

On 2012-06-29 10:28, HIMANSHU MITTAL wrote:

Hi all,
I have a text file in which the graph info is
stored as:
node1 node2 attr1 attr2
where there is an edge b/w node1&2 and attr1&2
are edge
atttributes

  is there any way to create a graph using such
format in r?


The igraph package?

Peter Ehlers


Regards,
Himanshu Mittal

[[alternative HTML version deleted]]

__**
R-help@r-project.org 
>
mailing list
https://stat.ethz.ch/mailman/**listinfo/r-help


  >__ethz.ch/mailman/__listinfo/r-__help


>>
PLEASE do read the posting guide
http://www.R-project.org/**

Re: [R] graph from txt file

2012-06-30 Thread HIMANSHU MITTAL
Thanks a lot.
Just one more question.
me given the two node ids and the graph, can i find the corresponding edge
attributes( date and label)?

On Sat, Jun 30, 2012 at 2:10 PM, Rui Barradas  wrote:

> Hello,
>
> Just set the attribute,
>
> V(g)$date <- as.POSIXct(as.POSIXlt(rep(**315522000, 6),
> origin="1970-01-01"))
> V(g)$date
>
>
> Rui Barradas
>
> Em 30-06-2012 04:26, HIMANSHU MITTAL escreveu:
>
>> Thanks a lot.
>> But i have one more doubt
>> one of the attribute i have is time of edge formation
>>
>> id1,id2,label,time
>> 51,66,0,315522000
>> 51,66,0,315522000
>> 140,157,0,315522000
>> 140,173,0,415522000
>> so is there any attribute for storing timestamps like for weight or color
>> or if i store it in color would i lose the information?
>>
>> On Sat, Jun 30, 2012 at 2:56 AM, Rui Barradas > > wrote:
>>
>>Hello,
>>
>>Package igraph can create graphs. Example:
>>
>>dat <- read.table(text="
>>node1  node2  attr1  attr2
>>2  1  2  3
>>3  2  3  2
>>4  3  4  2
>>6  5  1  4
>>", header=TRUE)
>>dat
>>
>>vertices <- as.vector( t(dat[, 1:2]) )
>>
>>g <- graph(vertices, directed=FALSE)
>>E(g)$weight <- dat$attr1
>>E(g)$color <- dat$attr2
>>
>>plot(g, layout=layout.circle, edge.label=E(g)$weight,
>>edge.color=E(g)$color)
>>
>>
>>Also, you should post data examples like the posting guide says.
>>With your description, a small example like the one above would do.
>>
>>Hope this helps,
>>
>>Rui Barradas
>>
>>Em 29-06-2012 19:05, HIMANSHU MITTAL escreveu:
>>
>>yes i would prefer igraph, but it can be any r package as long
>>as it can
>>create the graph
>>
>>On Fri, Jun 29, 2012 at 11:14 PM, Peter Ehlers
>>mailto:ehl...@ucalgary.ca>> wrote:
>>
>>On 2012-06-29 10:28, HIMANSHU MITTAL wrote:
>>
>>Hi all,
>>I have a text file in which the graph info is stored as:
>>node1 node2 attr1 attr2
>>where there is an edge b/w node1&2 and attr1&2 are edge
>>atttributes
>>
>>  is there any way to create a graph using such format in
>> r?
>>
>>
>>The igraph package?
>>
>>Peter Ehlers
>>
>>
>>Regards,
>>Himanshu Mittal
>>
>>[[alternative HTML version deleted]]
>>
>>__**__**
>>R-help@r-project.org 
>>mailing list
>>
>> https://stat.ethz.ch/mailman/***__*listinfo/r-help
>>
>> 
>> >> >__ethz.ch/mailman/**listinfo/r-__help
>>
>>
>> 
>> >>
>>PLEASE do read the posting guide
>> http://www.R-project.org/**
>>posting-guide.html
>>
>> 
>>
>>
>> 
>> >>
>>
>>and provide commented, minimal, self-contained,
>>reproducible code.
>>
>>
>>
>>
>>[[alternative HTML version deleted]]
>>
>>__**__
>>R-help@r-project.org  mailing list
>>
>> https://stat.ethz.ch/mailman/_**_listinfo/r-help
>>
>>
>> 
>> >
>>PLEASE do read the posting guide
>>
>> http://www.R-project.org/__**posting-guide.html
>>
>>
>> 
>> >
>>and provide commented, minimal, self-contained, reproducible code.
>>
>>
>>
>>
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph from txt file

2012-06-30 Thread Rui Barradas

Hello,

Just set the attribute,

V(g)$date <- as.POSIXct(as.POSIXlt(rep(315522000, 6), origin="1970-01-01"))
V(g)$date


Rui Barradas

Em 30-06-2012 04:26, HIMANSHU MITTAL escreveu:

Thanks a lot.
But i have one more doubt
one of the attribute i have is time of edge formation

id1,id2,label,time
51,66,0,315522000
51,66,0,315522000
140,157,0,315522000
140,173,0,415522000
so is there any attribute for storing timestamps like for weight or color
or if i store it in color would i lose the information?

On Sat, Jun 30, 2012 at 2:56 AM, Rui Barradas mailto:ruipbarra...@sapo.pt>> wrote:

Hello,

Package igraph can create graphs. Example:

dat <- read.table(text="
node1  node2  attr1  attr2
2  1  2  3
3  2  3  2
4  3  4  2
6  5  1  4
", header=TRUE)
dat

vertices <- as.vector( t(dat[, 1:2]) )

g <- graph(vertices, directed=FALSE)
E(g)$weight <- dat$attr1
E(g)$color <- dat$attr2

plot(g, layout=layout.circle, edge.label=E(g)$weight,
edge.color=E(g)$color)


Also, you should post data examples like the posting guide says.
With your description, a small example like the one above would do.

Hope this helps,

Rui Barradas

Em 29-06-2012 19:05, HIMANSHU MITTAL escreveu:

yes i would prefer igraph, but it can be any r package as long
as it can
create the graph

On Fri, Jun 29, 2012 at 11:14 PM, Peter Ehlers
mailto:ehl...@ucalgary.ca>> wrote:

On 2012-06-29 10:28, HIMANSHU MITTAL wrote:

Hi all,
I have a text file in which the graph info is stored as:
node1 node2 attr1 attr2
where there is an edge b/w node1&2 and attr1&2 are edge
atttributes

  is there any way to create a graph using such format in r?


The igraph package?

Peter Ehlers


Regards,
Himanshu Mittal

[[alternative HTML version deleted]]

**
R-help@r-project.org 
mailing list
https://stat.ethz.ch/mailman/*__*listinfo/r-help

>
PLEASE do read the posting guide http://www.R-project.org/**
posting-guide.html
>

and provide commented, minimal, self-contained,
reproducible code.




[[alternative HTML version deleted]]


R-help@r-project.org  mailing list
https://stat.ethz.ch/mailman/__listinfo/r-help

PLEASE do read the posting guide
http://www.R-project.org/__posting-guide.html

and provide commented, minimal, self-contained, reproducible code.





__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph from txt file

2012-06-29 Thread HIMANSHU MITTAL
Thanks a lot.
But i have one more doubt
one of the attribute i have is time of edge formation

id1,id2,label,time
51,66,0,315522000
51,66,0,315522000
140,157,0,315522000
140,173,0,415522000
so is there any attribute for storing timestamps like for weight or color
or if i store it in color would i lose the information?

On Sat, Jun 30, 2012 at 2:56 AM, Rui Barradas  wrote:

> Hello,
>
> Package igraph can create graphs. Example:
>
> dat <- read.table(text="
> node1  node2  attr1  attr2
> 2  1  2  3
> 3  2  3  2
> 4  3  4  2
> 6  5  1  4
> ", header=TRUE)
> dat
>
> vertices <- as.vector( t(dat[, 1:2]) )
>
> g <- graph(vertices, directed=FALSE)
> E(g)$weight <- dat$attr1
> E(g)$color <- dat$attr2
>
> plot(g, layout=layout.circle, edge.label=E(g)$weight,
> edge.color=E(g)$color)
>
>
> Also, you should post data examples like the posting guide says.
> With your description, a small example like the one above would do.
>
> Hope this helps,
>
> Rui Barradas
>
> Em 29-06-2012 19:05, HIMANSHU MITTAL escreveu:
>
>> yes i would prefer igraph, but it can be any r package as long as it can
>> create the graph
>>
>> On Fri, Jun 29, 2012 at 11:14 PM, Peter Ehlers 
>> wrote:
>>
>>  On 2012-06-29 10:28, HIMANSHU MITTAL wrote:
>>>
>>>  Hi all,
 I have a text file in which the graph info is stored as:
 node1 node2 attr1 attr2
 where there is an edge b/w node1&2 and attr1&2 are edge atttributes

  is there any way to create a graph using such format in r?


>>> The igraph package?
>>>
>>> Peter Ehlers
>>>
>>>
>>>  Regards,
 Himanshu Mittal

[[alternative HTML version deleted]]

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 
 >
 PLEASE do read the posting guide http://www.R-project.org/**
 posting-guide.html 
 
 >

 and provide commented, minimal, self-contained, reproducible code.


>>>
>>>
>>[[alternative HTML version deleted]]
>>
>> __**
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/**listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/**
>> posting-guide.html 
>> and provide commented, minimal, self-contained, reproducible code.
>>
>>
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph from txt file

2012-06-29 Thread Rui Barradas

Hello,

Package igraph can create graphs. Example:

dat <- read.table(text="
node1  node2  attr1  attr2
2  1  2  3
3  2  3  2
4  3  4  2
6  5  1  4
", header=TRUE)
dat

vertices <- as.vector( t(dat[, 1:2]) )

g <- graph(vertices, directed=FALSE)
E(g)$weight <- dat$attr1
E(g)$color <- dat$attr2

plot(g, layout=layout.circle, edge.label=E(g)$weight, edge.color=E(g)$color)


Also, you should post data examples like the posting guide says.
With your description, a small example like the one above would do.

Hope this helps,

Rui Barradas

Em 29-06-2012 19:05, HIMANSHU MITTAL escreveu:

yes i would prefer igraph, but it can be any r package as long as it can
create the graph

On Fri, Jun 29, 2012 at 11:14 PM, Peter Ehlers  wrote:


On 2012-06-29 10:28, HIMANSHU MITTAL wrote:


Hi all,
I have a text file in which the graph info is stored as:
node1 node2 attr1 attr2
where there is an edge b/w node1&2 and attr1&2 are edge atttributes

  is there any way to create a graph using such format in r?



The igraph package?

Peter Ehlers



Regards,
Himanshu Mittal

[[alternative HTML version deleted]]

__**
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/**listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/**
posting-guide.html 
and provide commented, minimal, self-contained, reproducible code.






[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph from txt file

2012-06-29 Thread HIMANSHU MITTAL
yes i would prefer igraph, but it can be any r package as long as it can
create the graph

On Fri, Jun 29, 2012 at 11:14 PM, Peter Ehlers  wrote:

> On 2012-06-29 10:28, HIMANSHU MITTAL wrote:
>
>> Hi all,
>> I have a text file in which the graph info is stored as:
>> node1 node2 attr1 attr2
>> where there is an edge b/w node1&2 and attr1&2 are edge atttributes
>>
>>  is there any way to create a graph using such format in r?
>>
>
> The igraph package?
>
> Peter Ehlers
>
>
>> Regards,
>> Himanshu Mittal
>>
>>[[alternative HTML version deleted]]
>>
>> __**
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/**listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/**
>> posting-guide.html 
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph from txt file

2012-06-29 Thread Peter Ehlers

On 2012-06-29 10:28, HIMANSHU MITTAL wrote:

Hi all,
I have a text file in which the graph info is stored as:
node1 node2 attr1 attr2
where there is an edge b/w node1&2 and attr1&2 are edge atttributes

  is there any way to create a graph using such format in r?


The igraph package?

Peter Ehlers



Regards,
Himanshu Mittal

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph with two different arithmetic scales

2012-06-27 Thread R. Michael Weylandt
take a look at

library(zoo)
example(plot.zoo)

which shows one way to do this,

Best,
Michael

On Wed, Jun 27, 2012 at 6:50 PM, denissearchundia
 wrote:
> hi
>
> i try to do a graph who shows  2 time series at the same time
>
> thanks!
>
> --
> View this message in context: 
> http://r.789695.n4.nabble.com/graph-with-two-different-arithmetic-scales-tp4634672.html
> Sent from the R help mailing list archive at Nabble.com.
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph displays

2012-06-26 Thread John Kane
Sorry I misunderstood what you wanted.   Using ggplot2 and reshape2 which I 
imagine you will have to install, this should give you what you want

library(ggplot2)
library(reshape2)

xx1  <-  melt(Dataset, id = c("Source"))

p  <-  ggplot( xx1 , aes(variable, value, fill= Source   )) +
geom_bar(position = "dodge") +
   scale_y_continuous(" Scale Values") +
   scale_x_discrete("X values") +
   opts( title = "Graphing Exercise")
 
p




John Kane
Kingston ON Canada


> -Original Message-
> From: ricardosousa2...@clix.pt
> Sent: Tue, 26 Jun 2012 01:24:17 -0700 (PDT)
> To: r-help@r-project.org
> Subject: Re: [R] graph displays
> 
> 
> 
> Good morning,
> Thanks for help.
> I can explain better what I am trying to do.
> I'm trying to read data from a file, separated by a tab, with the
> following
> code.
> 
> 
> Dataset<-read.table("C:/Users/Administrator/Desktop/R/graph.txt",sep="\t",
> quote="\"",header = TRUE)
> View(Dataset)
> dput(Dataset)
> 
>> View(Dataset)
>> dput(Dataset)
> structure(list(Source = structure(1:3, .Label = c("A", "B", "C"
> ), class = "factor"), X1000s = c(47L, 37L, 17L), X600s = c(63L,
> 64L, 62L), X500s = c(75L, 45L, 25L), X250s = c(116L, 11L, 66L
> ), X100s = c(125L, 25L, 12L), X50s = c(129L, 19L, 29L), X10s = c(131L,
> 61L, 91L), X5s = c(131L, 131L, 171L), X3s = c(131L, 186L, 186L
> ), X1s = c(131L, 186L, 186L)), .Names = c("Source", "X1000s",
> "X600s", "X500s", "X250s", "X100s", "X50s", "X10s", "X5s", "X3s",
> "X1s"), class = "data.frame", row.names = c(NA, -3L))
>> Dataset
>   Source X1000s X600s X500s X250s X100s X50s X10s X5s X3s X1s
> 1  A 476375   116   125  129  131 131 131 131
> 2  B 3764451125   19   61 131 186 186
> 3  C 1762256612   29   91 171 186 186
> 
> 
> the idea is to get a graph like this excel, but in R,
> as I'm still in the learning phase of the R, I have little knowledge how
> to
> do
> 
> http://imageshack.us/photo/my-images/51/testlt.png/
> 
> --
> View this message in context:
> http://r.789695.n4.nabble.com/graph-displays-tp4634448p4634488.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.


Receive Notifications of Incoming Messages
Easily monitor multiple email accounts & access them with a click.
Visit http://www.inbox.com/notifier and check it out!

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph displays

2012-06-26 Thread Jim Lemon

On 06/26/2012 06:24 PM, MSousa wrote:



Good morning,
Thanks for help.
I can explain better what I am trying to do.
I'm trying to read data from a file, separated by a tab, with the following
code.


Dataset<-read.table("C:/Users/Administrator/Desktop/R/graph.txt",sep="\t",
quote="\"",header = TRUE)
View(Dataset)
dput(Dataset)


View(Dataset)
dput(Dataset)

structure(list(Source = structure(1:3, .Label = c("A", "B", "C"
), class = "factor"), X1000s = c(47L, 37L, 17L), X600s = c(63L,
64L, 62L), X500s = c(75L, 45L, 25L), X250s = c(116L, 11L, 66L
), X100s = c(125L, 25L, 12L), X50s = c(129L, 19L, 29L), X10s = c(131L,
61L, 91L), X5s = c(131L, 131L, 171L), X3s = c(131L, 186L, 186L
), X1s = c(131L, 186L, 186L)), .Names = c("Source", "X1000s",
"X600s", "X500s", "X250s", "X100s", "X50s", "X10s", "X5s", "X3s",
"X1s"), class = "data.frame", row.names = c(NA, -3L))

Dataset

   Source X1000s X600s X500s X250s X100s X50s X10s X5s X3s X1s
1  A 476375   116   125  129  131 131 131 131
2  B 3764451125   19   61 131 186 186
3  C 1762256612   29   91 171 186 186


the idea is to get a graph like this excel, but in R,
as I'm still in the learning phase of the R, I have little knowledge how to
do

http://imageshack.us/photo/my-images/51/testlt.png/


Hi MSousa,
Try this:

library(plotrix)
barp(Dataset[,-1],names.arg=rep("",10),col=2:4)
staxlab(1,at=1:10,labels=names(Dataset)[-1])
legend(2,170,Dataset$Source,fill=2:4)

Jim

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph displays

2012-06-26 Thread MSousa


Good morning,
Thanks for help.
I can explain better what I am trying to do.
I'm trying to read data from a file, separated by a tab, with the following
code.


Dataset<-read.table("C:/Users/Administrator/Desktop/R/graph.txt",sep="\t",
quote="\"",header = TRUE)
View(Dataset)
dput(Dataset)

> View(Dataset)
> dput(Dataset)
structure(list(Source = structure(1:3, .Label = c("A", "B", "C"
), class = "factor"), X1000s = c(47L, 37L, 17L), X600s = c(63L, 
64L, 62L), X500s = c(75L, 45L, 25L), X250s = c(116L, 11L, 66L
), X100s = c(125L, 25L, 12L), X50s = c(129L, 19L, 29L), X10s = c(131L, 
61L, 91L), X5s = c(131L, 131L, 171L), X3s = c(131L, 186L, 186L
), X1s = c(131L, 186L, 186L)), .Names = c("Source", "X1000s", 
"X600s", "X500s", "X250s", "X100s", "X50s", "X10s", "X5s", "X3s", 
"X1s"), class = "data.frame", row.names = c(NA, -3L))
> Dataset
  Source X1000s X600s X500s X250s X100s X50s X10s X5s X3s X1s
1  A 476375   116   125  129  131 131 131 131
2  B 3764451125   19   61 131 186 186
3  C 1762256612   29   91 171 186 186


the idea is to get a graph like this excel, but in R, 
as I'm still in the learning phase of the R, I have little knowledge how to
do

http://imageshack.us/photo/my-images/51/testlt.png/

--
View this message in context: 
http://r.789695.n4.nabble.com/graph-displays-tp4634448p4634488.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph displays

2012-06-25 Thread John Kane
xx  <- structure(list(X1000s = c(47L, 37L, 17L), X600s = c(63L, 64L, 
62L), X500s = c(75L, 45L, 25L), X250s = c(116L, 11L, 66L), X100s = c(125L, 
25L, 12L), X50s = c(129L, 19L, 29L), X10s = c(131L, 61L, 91L), 
X5s = c(131L, 131L, 171L), X3s = c(131L, 186L, 186L), X1s = c(131L, 
186L, 186L)), .Names = c("X1000s", "X600s", "X500s", "X250s", 
"X100s", "X50s", "X10s", "X5s", "X3s", "X1s"), class = "data.frame", row.names 
= c("A", 
"B", "C"))

#then this should do 
barplot(t(xx))

John Kane
Kingston ON Canada


> -Original Message-
> From: ricardosousa2...@clix.pt
> Sent: Mon, 25 Jun 2012 09:24:36 -0700 (PDT)
> To: r-help@r-project.org
> Subject: [R] graph displays
> 
> 
> Good Afternoon, I'm trying to create a graph that displays the best way
> the
> following information.
> 
>     For instance organized by bar graph, A, B, C
> 
> 
> 
> Source X1000s X600s X500s X250s X100s X50s X10s X5s X3s X1s
> 1  A 476375   116   125  129  131 131 131 131
> 2  B 3764451125   19   61 131 186 186
> 3  C 1762256612   29   91 171 186 186
> 
> thanks
> 
> 
> 
> --
> View this message in context:
> http://r.789695.n4.nabble.com/graph-displays-tp4634448.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.


GET FREE SMILEYS FOR YOUR IM & EMAIL - Learn more at 
http://www.inbox.com/smileys
Works with AIM®, MSN® Messenger, Yahoo!® Messenger, ICQ®, Google Talk™ and most 
webmails

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph displays

2012-06-25 Thread Sarah Goslee
There's no way we can tell you the "best way" to display your
information, because we don't know anything about it. The best display
method has a lot to do with what the data are, and what you're trying
to illustrate. That said, here are two possibilities, one using the
bar graph you requested, and both using only base graphics.

# PLEASE use dput() to provide your data, rather than pasting it in
testdata <- structure(list(Source = c("A", "B", "C"), X1000s = c(47L, 37L,
17L), X600s = c(63L, 64L, 62L), X500s = c(75L, 45L, 25L), X250s = c(116L,
11L, 66L), X100s = c(125L, 25L, 12L), X50s = c(129L, 19L, 29L
), X10s = c(131L, 61L, 91L), X5s = c(131L, 131L, 171L), X3s = c(131L,
186L, 186L), X1s = c(131L, 186L, 186L)), .Names = c("Source",
"X1000s", "X600s", "X500s", "X250s", "X100s", "X50s", "X10s",
"X5s", "X3s", "X1s"), class = "data.frame", row.names = c("1",
"2", "3"))

barplot(as.matrix(testdata[,-1]), beside=TRUE, col=1:3)
legend("topleft", LETTERS[1:3], col=1:3, pch=15)

plot(1:10, testdata[1, -1], type="b", ylim=c(0, 200), xaxt="n", col=1)
axis(1, 1:10, colnames(testdata)[-1])
lines(1:10, testdata[2, -1], type="b", col=2)
lines(1:10, testdata[3, -1], type="b", col=3)
legend("topleft", LETTERS[1:3], col=1:3, pch=15)

Sarah

On Mon, Jun 25, 2012 at 12:24 PM, MSousa  wrote:
>
> Good Afternoon, I'm trying to create a graph that displays the best way the
> following information.
>
>     For instance organized by bar graph, A, B, C
>
>
>
> Source X1000s X600s X500s X250s X100s X50s X10s X5s X3s X1s
> 1      A     47    63    75   116   125  129  131 131 131 131
> 2      B     37    64    45    11    25   19   61 131 186 186
> 3      C     17    62    25    66    12   29   91 171 186 186
>
> thanks
>
>

-- 
Sarah Goslee
http://www.functionaldiversity.org

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph to visualize paired t test

2012-05-22 Thread Richard M. Heiberger
tmp <- data.frame(A=sample(20,10), B=sample(20, 10))
with(tmp, t.test(A, B))
matplot(t(tmp), type="b")

This does what you asked for.  I don't understand the legend on your plot.

For future queries,
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

The nabble interface is not encouraged.  Please write directly to the list
R-help@r-project.org

Rich

On Tue, May 22, 2012 at 11:14 AM, jhartsho  wrote:

> http://r.789695.n4.nabble.com/file/n4630909/pfaff_fig1.gif
>
> I have run the statistics and found no significance in my pairwise t test.
> I want to create a graph similar to the one I included showing similar
> slopes/lines for my data points.  For my data a correlation graph is not
> appropriate and looks very confusing.  Is the easiest way to create several
> lines between points I enter manually or is there a way to create this
> graph
> from entering my pairwise.t.test data?
>
> Thanks in advance
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/Graph-to-visualize-paired-t-test-tp4630909.html
> Sent from the R help mailing list archive at Nabble.com.
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph to visualize paired t test

2012-05-22 Thread R. Michael Weylandt
If I understand what you are looking for, this should get you started:

https://www.stat.math.ethz.ch/pipermail/r-help/2012-May/312287.html

Michael

On Tue, May 22, 2012 at 11:14 AM, jhartsho  wrote:
> http://r.789695.n4.nabble.com/file/n4630909/pfaff_fig1.gif
>
> I have run the statistics and found no significance in my pairwise t test.
> I want to create a graph similar to the one I included showing similar
> slopes/lines for my data points.  For my data a correlation graph is not
> appropriate and looks very confusing.  Is the easiest way to create several
> lines between points I enter manually or is there a way to create this graph
> from entering my pairwise.t.test data?
>
> Thanks in advance
>
> --
> View this message in context: 
> http://r.789695.n4.nabble.com/Graph-to-visualize-paired-t-test-tp4630909.html
> Sent from the R help mailing list archive at Nabble.com.
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph Titles

2012-01-28 Thread chuck.01
Hard to help without a short example dataset (please read posting guide!)
posted with dput(). 
You likely want to "paste" together a title for your graph. 
see 
?paste


Rambler1 wrote
> 
> Another simple question that is driving me crazy:
> I have a for loop that loops through a matrix and pulls data from two
> different variables, computes differences and runs a regression then plots
> a formula I made:
> 
> for(i in 1:1){
> halo <- sex[i,]
> holder <- get(halo)['2011::'][,6]
> halo2 <- sex[i,2]
> holder2 <- get(halo2)['2011::'][,6]
> ret1<- diff(holder)[-1]
> ret2<- diff(holder2)[-1]
> model<- lm(ret1 ~ ret2 - 1)
> hr <- as.numeric(model$coefficients[1])
> pairs <- ret1 - hr * ret2
> plot(pairs)
> }
> 
> The loop works fine and the appropriate number of graphs are printed. 
> 
> How would I go about putting a title at the top that would change for each
> graph? 
> That two variables are "halo" and "halo2" form the for loop. 
> 
> Ideally I want it to look like this:
> plot(pairs, main = halo " vs " halo2)
> 
> Thank you for your help.
> 


--
View this message in context: 
http://r.789695.n4.nabble.com/Graph-Titles-tp4335020p4336830.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph digitisation / tracing

2012-01-28 Thread Derek Ogle
I have successfully used the digitize package for this purpose ...

http://cran.r-project.org/web/packages/digitize/index.html


 wrote:
>
> I want to take some published graphs and digitise them to allow me to 
> run some analysis on them.
> Is this possible using any of R's
> plugins. I don't think it is but I never cease to be amazed at what R 
> can do and it'd be great if it was as it would almost certainly be 
> more powerful than doing it in one of the web programmes that can do it

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph digitisation / tracing

2012-01-28 Thread Sarah Goslee
Hi,

On Sat, Jan 28, 2012 at 5:42 AM,
 wrote:
>
>
> I want to take some published graphs and digitise them to allow me
> to run some analysis on them.

You can do this manually with locator(), but it's more efficient to use
something like ImageJ if you have a lot to do.

Or, you know, just email the authors and ask to collaborate.

> Is this possible using any of R's
> plugins. I don't think it is but I never cease to be amazed at what R
> can do and it'd be great if it was as it would almost certainly be more
> powerful than doing it in one of the web programmes that can do it

Sarah
-- 
Sarah Goslee
http://www.functionaldiversity.org

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph paper look

2012-01-23 Thread Greg Snow
In addition to the recommendations to use the grid function, you could just do:

par(tck=1)

before calling the plotting functions.

-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On 
Behalf Of Erin Hodgess
Sent: Wednesday, January 18, 2012 6:19 PM
To: r-help@r-project.org
Subject: [R] graph paper look

Dear R People:

Short of doing a series of ablines, is there a way to produce "graph
paper" in R please?

Thanks,
Erin


-- 
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph paper look

2012-01-19 Thread David L Carlson
You could look at grid(), but the Note in the documentation suggests "If
more fine tuning is required, use abline(h = ., v = .) directly." Also
grid() uses the default axis positions so if you specify details of the axis
with xlim, ylim, etc the grid does not line up on the tickmarks. 

Using abline is pretty simple. Use xpd=TRUE to get abline to draw outside
the plot region.

oldpar <- par(xpd=TRUE)
plot(c(0,1),c(0,1), axes=FALSE, pch=NA, xlab="", ylab="") 
abline(v=seq(-1, 2, .1), h=seq(-1, 2, .1), lty=3, col="gray")
abline(v=seq(-1, 2, .5), h=seq(-1, 2, .5), lty=1, col="gray")
par(oldpar)

--
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77843-4352


-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Erin Hodgess
Sent: Wednesday, January 18, 2012 7:19 PM
To: r-help@r-project.org
Subject: [R] graph paper look

Dear R People:

Short of doing a series of ablines, is there a way to produce "graph
paper" in R please?

Thanks,
Erin


-- 
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph paper look

2012-01-18 Thread Pete Brecknock

Erin Hodgess-2 wrote
> 
> Dear R People:
> 
> Short of doing a series of ablines, is there a way to produce "graph
> paper" in R please?
> 
> Thanks,
> Erin
> 
> 
> -- 
> Erin Hodgess
> Associate Professor
> Department of Computer and Mathematical Sciences
> University of Houston - Downtown
> mailto: erinm.hodgess@
> 
> __
> R-help@ mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 

How about ...

x = rnorm(100)
y = rnorm(100)
plot(x,y)
grid()

HTH

Pete

--
View this message in context: 
http://r.789695.n4.nabble.com/graph-paper-look-tp4308827p4308906.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph paper look

2012-01-18 Thread Ben Bolker
Erin Hodgess  gmail.com> writes:

> Short of doing a series of ablines, is there a way to produce "graph
> paper" in R please?

  How about ?grid ...

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph paper look

2012-01-18 Thread baptiste auguie
You could draw a grid with grid, using grid.grill,

library(grid)

pdf("grid.pdf", width=21/2.54,height=29.7/2.54)
grid.grill(h = unit(seq(0, 297, by=1), "mm"),
   v = unit(seq(0, 210, by=1), "mm"), gp=gpar(col="grey",lwd=0.1))
grid.grill(h = unit(seq(0, 297, by=5), "mm"),
   v = unit(seq(0, 210, by=5), "mm"), gp=gpar(col="grey20",lwd=0.2))
grid.grill(h = unit(seq(0, 29.7, by=1), "cm"),
   v = unit(seq(0, 21, by=1), "cm"), gp=gpar(col="black",lwd=1))
dev.off()

HTH,

b.


On 19 January 2012 14:18, Erin Hodgess  wrote:
> Dear R People:
>
> Short of doing a series of ablines, is there a way to produce "graph
> paper" in R please?
>
> Thanks,
> Erin
>
>
> --
> Erin Hodgess
> Associate Professor
> Department of Computer and Mathematical Sciences
> University of Houston - Downtown
> mailto: erinm.hodg...@gmail.com
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph binned data

2011-11-06 Thread David Winsemius


On Nov 7, 2011, at 12:09 AM, Jeffrey Joh wrote:



I have a table that looks like this:

structure(list(speed = c(3,9,14,8,7,6), result = c(0.697, 0.011,  
0.015, 0.012, 0.018, 0.019), house = c(1,

1, 1, 1, 1, 1), date = c(719, 1027, 1027, 1027, 1030, 1030),
   id = c("1000", "1",
   "10001", "10002", "10003", "10004")), .Names = c("speed",
"result", "house", "date", "id"), class = "data.frame", row.names =  
c("1000",

"1", "10001", "10002", "10003", "10004"))

I would like to bin the data by speed, 0-4, 5-9, 10-14, 15-20, etc.


?cut

 Then I would like to make a graph of speed vs result.  The graph  
should show the average result of each bin,


?tapply
?mean

dat$sgrp <- cut(dat$speed, c(0,5,10, 15, 20), include.lowest=TRUE,  
right=TRUE)

 plot( tapply(dat$speed, dat$sgrp, mean), xaxt="n", ylim=c(0,20))
 axis(1, at= 1:4, labels = levels(dat$sgrp) )

and error bars to represent the standard deviation of the result in  
each bin.  What kind of code can I use to make this?


(This would seem to be pretty basic material. Why don't you do further  
study of whatever introductory texts you are using.) The CI's can be  
added with one of the functions in package 'plotrix'.





Jeffrey

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


David Winsemius, MD
West Hartford, CT

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph bugs using R on MAC

2011-09-18 Thread bby2103
Cool! Don showed me another trick--use (n= ) in Identify. The active  
window will come back to console after the specified amount of clicks,  
you will be able to execute more commands in console.


Thank you!

Quoting Duncan Murdoch :


On 11-09-18 5:15 PM, bby2...@columbia.edu wrote:

Don and Duncan,

That function works, up to the same point where I can save pdf into
Word using the menu. But when I use Identify function together with
plot function, the Quartz window has to be closed before I can go back
the console to execute "copy2eps" function. But by then, I don't have
an active device anymore. So it beats the purpose.


You stop the identify function by right-clicking in the graphics
window. I have my one-button Mac set up to do this with a two-finger
tap, you may have it set some other way.  (I think Mac calls this a
"secondary tap".)  After that dev.copy2eps should copy the identifiers
too.

Duncan Murdoch




Dan,

I'm using Word 2004. Upgrading Word is an idea. I will definitely look
into it, although I didn't think those who didn't have this problem
necessarily had a higher version of Word.

Bonnie Yuan

Quoting Duncan Murdoch:


On 11-09-18 4:53 PM, Don McKenzie wrote:

I think it's actually dev.copy2eps()

or at least that one works.


Right, sorry.

Duncan Murdoch




On 18-Sep-11, at 1:51 PM, Duncan Murdoch wrote:


On 11-09-18 4:11 PM, bby2...@columbia.edu wrote:

Yes, I'm positive I had the right window highlighted, and I have
shown
this problem to lots of people including tech staff, to get no
answers. So I suspect it's probably a somewhat obscure problem.

Duncan, thanks for the lead on the new group. I will follow up on
that. What is the copy2eps? Is it to Excel? Do you get that option
in R?


copy2eps() is a function in R.  Try ?copy2eps for details.

Duncan Murdoch



Bonnie Yuan.

Quoting Duncan Murdoch:


On 11-09-18 3:48 PM, Don McKenzie wrote:


On 18-Sep-11, at 12:38 PM, bby2...@columbia.edu wrote:


This is has been bugging me for a long time. Nobody around me
seems
to have this problem. I hope someone on the forum could help me.

When I generate a R graph and want to bring the image into Word. I
cannot copy and paste it like many of my classmates can do. The
"Select" in Edit menu have all options grayed out.


You want "Copy", not "Select".  Then Paste into your word
processor.


That doesn't work for me with OpenOffice (I don't have Word).
copy2eps(file="some.eps") does work, along with Insert | Picture
| From
file...




So what I ended up doing is to save it as pdf file and bring it
into Word. But if I use "Identify" in the Plot statement, there
will be values labels on the graph when you click on the
observation. For some reason, these labels don't show up in the
pdf
file.


They did show up with copy2eps().  I didn't try copy2pdf(); my
copy of
OpenOffice doesn't recognize .pdf as a picture type.

But Bonnie will probably get a better answer on the R-sig-mac list.

Duncan Murdoch



So the last resort I have is prinscreen, which always have
irrelevant things showing.

I've tried updating R/OS and all softwares on my MAC, but nothing
seems to do anything. I have OX 10.6.8. Does this problem sound
familiar to anyone?

Thanks in advance!

Bonnie Yuan

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-
guide.html
and provide commented, minimal, self-contained, reproducible code.


When we look at the wings of the eagle
To the left, closest to the heart, is the spirit
To the right, far away from the heart, is the science
No bird can ever lift off with wings that are not equal

-- Greenland First Nations elder
  quoted in EOS Transactions


Don McKenzie, Research Ecologist
Pacific WIldland Fire Sciences Lab
US Forest Service

Affiliate Professor
School of Forest Resources, College of the Environment
CSES Climate Impacts Group
University of Washington

phone: 206-732-7824
d...@uw.edu

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/
posting-guide.html
and provide commented, minimal, self-contained, reproducible code.










Don McKenzie, Research Ecologist
Pacific WIldland Fire Sciences Lab
US Forest Service

Affiliate Professor
School of Forest Resources, College of the Environment
CSES Climate Impacts Group
University of Washington

phone: 206-732-7824
d...@uw.edu









__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph bugs using R on MAC

2011-09-18 Thread Duncan Murdoch

On 11-09-18 5:15 PM, bby2...@columbia.edu wrote:

Don and Duncan,

That function works, up to the same point where I can save pdf into
Word using the menu. But when I use Identify function together with
plot function, the Quartz window has to be closed before I can go back
the console to execute "copy2eps" function. But by then, I don't have
an active device anymore. So it beats the purpose.


You stop the identify function by right-clicking in the graphics window. 
I have my one-button Mac set up to do this with a two-finger tap, you 
may have it set some other way.  (I think Mac calls this a "secondary 
tap".)  After that dev.copy2eps should copy the identifiers too.


Duncan Murdoch




Dan,

I'm using Word 2004. Upgrading Word is an idea. I will definitely look
into it, although I didn't think those who didn't have this problem
necessarily had a higher version of Word.

Bonnie Yuan

Quoting Duncan Murdoch:


On 11-09-18 4:53 PM, Don McKenzie wrote:

I think it's actually dev.copy2eps()

or at least that one works.


Right, sorry.

Duncan Murdoch




On 18-Sep-11, at 1:51 PM, Duncan Murdoch wrote:


On 11-09-18 4:11 PM, bby2...@columbia.edu wrote:

Yes, I'm positive I had the right window highlighted, and I have
shown
this problem to lots of people including tech staff, to get no
answers. So I suspect it's probably a somewhat obscure problem.

Duncan, thanks for the lead on the new group. I will follow up on
that. What is the copy2eps? Is it to Excel? Do you get that option
in R?


copy2eps() is a function in R.  Try ?copy2eps for details.

Duncan Murdoch



Bonnie Yuan.

Quoting Duncan Murdoch:


On 11-09-18 3:48 PM, Don McKenzie wrote:


On 18-Sep-11, at 12:38 PM, bby2...@columbia.edu wrote:


This is has been bugging me for a long time. Nobody around me
seems
to have this problem. I hope someone on the forum could help me.

When I generate a R graph and want to bring the image into Word. I
cannot copy and paste it like many of my classmates can do. The
"Select" in Edit menu have all options grayed out.


You want "Copy", not "Select".  Then Paste into your word
processor.


That doesn't work for me with OpenOffice (I don't have Word).
copy2eps(file="some.eps") does work, along with Insert | Picture
| From
file...




So what I ended up doing is to save it as pdf file and bring it
into Word. But if I use "Identify" in the Plot statement, there
will be values labels on the graph when you click on the
observation. For some reason, these labels don't show up in the
pdf
file.


They did show up with copy2eps().  I didn't try copy2pdf(); my
copy of
OpenOffice doesn't recognize .pdf as a picture type.

But Bonnie will probably get a better answer on the R-sig-mac list.

Duncan Murdoch



So the last resort I have is prinscreen, which always have
irrelevant things showing.

I've tried updating R/OS and all softwares on my MAC, but nothing
seems to do anything. I have OX 10.6.8. Does this problem sound
familiar to anyone?

Thanks in advance!

Bonnie Yuan

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-
guide.html
and provide commented, minimal, self-contained, reproducible code.


When we look at the wings of the eagle
To the left, closest to the heart, is the spirit
To the right, far away from the heart, is the science
No bird can ever lift off with wings that are not equal

-- Greenland First Nations elder
   quoted in EOS Transactions


Don McKenzie, Research Ecologist
Pacific WIldland Fire Sciences Lab
US Forest Service

Affiliate Professor
School of Forest Resources, College of the Environment
CSES Climate Impacts Group
University of Washington

phone: 206-732-7824
d...@uw.edu

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/
posting-guide.html
and provide commented, minimal, self-contained, reproducible code.










Don McKenzie, Research Ecologist
Pacific WIldland Fire Sciences Lab
US Forest Service

Affiliate Professor
School of Forest Resources, College of the Environment
CSES Climate Impacts Group
University of Washington

phone: 206-732-7824
d...@uw.edu









__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph bugs using R on MAC

2011-09-18 Thread Don McKenzie
Sorry -- you do have to highlight the quartz window to use identify(), but that 
shouldn't matter either.

On Sep 18, 2011, at 2:41 PM, Don McKenzie wrote:

> 
> On Sep 18, 2011, at 2:15 PM, bby2...@columbia.edu wrote:
> 
>> Don and Duncan,
>> 
>> That function works, up to the same point where I can save pdf into Word 
>> using the menu. But when I use Identify function together with plot 
>> function, the Quartz window has to be closed before I can go back the 
>> console to execute "copy2eps" function.
>**
> This is indeed strange.  Running R 2.13.0 on mac SnowLeopard, with quartz 
> window manager
> 
> > plot(1,1)
> > identify(1,1)
> warning: no point within 0.25 inches
> [1] 1
> > dev.copy2eps(file="test.eps")
> quartz 
>  2 
> 
> The eps file shows up in my working directory just as it should.  There 
> should be no need to close the quartz window, 
> or even look at it for that matter.  Can you show us your session info?
> 
>> But by then, I don't have an active device anymore. So it beats the purpose.
>> 
>> Dan,
>> 
>> I'm using Word 2004. Upgrading Word is an idea. I will definitely look into 
>> it, although I didn't think those who didn't have this problem necessarily 
>> had a higher version of Word.
>> 
>> Bonnie Yuan
>> 
>> Quoting Duncan Murdoch :
>> 
>>> On 11-09-18 4:53 PM, Don McKenzie wrote:
 I think it's actually dev.copy2eps()
 
 or at least that one works.
>>> 
>>> Right, sorry.
>>> 
>>> Duncan Murdoch
>>> 
 
 
 On 18-Sep-11, at 1:51 PM, Duncan Murdoch wrote:
 
> On 11-09-18 4:11 PM, bby2...@columbia.edu wrote:
>> Yes, I'm positive I had the right window highlighted, and I have
>> shown
>> this problem to lots of people including tech staff, to get no
>> answers. So I suspect it's probably a somewhat obscure problem.
>> 
>> Duncan, thanks for the lead on the new group. I will follow up on
>> that. What is the copy2eps? Is it to Excel? Do you get that option
>> in R?
> 
> copy2eps() is a function in R.  Try ?copy2eps for details.
> 
> Duncan Murdoch
> 
>> 
>> Bonnie Yuan.
>> 
>> Quoting Duncan Murdoch:
>> 
>>> On 11-09-18 3:48 PM, Don McKenzie wrote:
 
 On 18-Sep-11, at 12:38 PM, bby2...@columbia.edu wrote:
 
> This is has been bugging me for a long time. Nobody around me
> seems
> to have this problem. I hope someone on the forum could help me.
> 
> When I generate a R graph and want to bring the image into Word. I
> cannot copy and paste it like many of my classmates can do. The
> "Select" in Edit menu have all options grayed out.
 
 You want "Copy", not "Select".  Then Paste into your word
 processor.
>>> 
>>> That doesn't work for me with OpenOffice (I don't have Word).
>>> copy2eps(file="some.eps") does work, along with Insert | Picture
>>> | From
>>> file...
>>> 
 
> So what I ended up doing is to save it as pdf file and bring it
> into Word. But if I use "Identify" in the Plot statement, there
> will be values labels on the graph when you click on the
> observation. For some reason, these labels don't show up in the
> pdf
> file.
>>> 
>>> They did show up with copy2eps().  I didn't try copy2pdf(); my
>>> copy of
>>> OpenOffice doesn't recognize .pdf as a picture type.
>>> 
>>> But Bonnie will probably get a better answer on the R-sig-mac list.
>>> 
>>> Duncan Murdoch
>>> 
> 
> So the last resort I have is prinscreen, which always have
> irrelevant things showing.
> 
> I've tried updating R/OS and all softwares on my MAC, but nothing
> seems to do anything. I have OX 10.6.8. Does this problem sound
> familiar to anyone?
> 
> Thanks in advance!
> 
> Bonnie Yuan
> 
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.
 
 When we look at the wings of the eagle
 To the left, closest to the heart, is the spirit
 To the right, far away from the heart, is the science
 No bird can ever lift off with wings that are not equal
 
 -- Greenland First Nations elder
  quoted in EOS Transactions
 
 
 Don McKenzie, Research Ecologist
 Pacific WIldland Fire Sciences Lab
 US Forest Service
 
 Affiliate Professor
 School of Forest Resources, College of the Environment
 CSES Climate Impacts Group
>>>

Re: [R] graph bugs using R on MAC

2011-09-18 Thread Don McKenzie

On Sep 18, 2011, at 2:15 PM, bby2...@columbia.edu wrote:

> Don and Duncan,
> 
> That function works, up to the same point where I can save pdf into Word 
> using the menu. But when I use Identify function together with plot function, 
> the Quartz window has to be closed before I can go back the console to 
> execute "copy2eps" function.
   **
This is indeed strange.  Running R 2.13.0 on mac SnowLeopard, with quartz 
window manager

> plot(1,1)
> identify(1,1)
warning: no point within 0.25 inches
[1] 1
> dev.copy2eps(file="test.eps")
quartz 
 2 

The eps file shows up in my working directory just as it should.  There should 
be no need to close the quartz window, 
or even look at it for that matter.  Can you show us your session info?

> But by then, I don't have an active device anymore. So it beats the purpose.
> 
> Dan,
> 
> I'm using Word 2004. Upgrading Word is an idea. I will definitely look into 
> it, although I didn't think those who didn't have this problem necessarily 
> had a higher version of Word.
> 
> Bonnie Yuan
> 
> Quoting Duncan Murdoch :
> 
>> On 11-09-18 4:53 PM, Don McKenzie wrote:
>>> I think it's actually dev.copy2eps()
>>> 
>>> or at least that one works.
>> 
>> Right, sorry.
>> 
>> Duncan Murdoch
>> 
>>> 
>>> 
>>> On 18-Sep-11, at 1:51 PM, Duncan Murdoch wrote:
>>> 
 On 11-09-18 4:11 PM, bby2...@columbia.edu wrote:
> Yes, I'm positive I had the right window highlighted, and I have
> shown
> this problem to lots of people including tech staff, to get no
> answers. So I suspect it's probably a somewhat obscure problem.
> 
> Duncan, thanks for the lead on the new group. I will follow up on
> that. What is the copy2eps? Is it to Excel? Do you get that option
> in R?
 
 copy2eps() is a function in R.  Try ?copy2eps for details.
 
 Duncan Murdoch
 
> 
> Bonnie Yuan.
> 
> Quoting Duncan Murdoch:
> 
>> On 11-09-18 3:48 PM, Don McKenzie wrote:
>>> 
>>> On 18-Sep-11, at 12:38 PM, bby2...@columbia.edu wrote:
>>> 
 This is has been bugging me for a long time. Nobody around me
 seems
 to have this problem. I hope someone on the forum could help me.
 
 When I generate a R graph and want to bring the image into Word. I
 cannot copy and paste it like many of my classmates can do. The
 "Select" in Edit menu have all options grayed out.
>>> 
>>> You want "Copy", not "Select".  Then Paste into your word
>>> processor.
>> 
>> That doesn't work for me with OpenOffice (I don't have Word).
>> copy2eps(file="some.eps") does work, along with Insert | Picture
>> | From
>> file...
>> 
>>> 
 So what I ended up doing is to save it as pdf file and bring it
 into Word. But if I use "Identify" in the Plot statement, there
 will be values labels on the graph when you click on the
 observation. For some reason, these labels don't show up in the
 pdf
 file.
>> 
>> They did show up with copy2eps().  I didn't try copy2pdf(); my
>> copy of
>> OpenOffice doesn't recognize .pdf as a picture type.
>> 
>> But Bonnie will probably get a better answer on the R-sig-mac list.
>> 
>> Duncan Murdoch
>> 
 
 So the last resort I have is prinscreen, which always have
 irrelevant things showing.
 
 I've tried updating R/OS and all softwares on my MAC, but nothing
 seems to do anything. I have OX 10.6.8. Does this problem sound
 familiar to anyone?
 
 Thanks in advance!
 
 Bonnie Yuan
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-
 guide.html
 and provide commented, minimal, self-contained, reproducible code.
>>> 
>>> When we look at the wings of the eagle
>>> To the left, closest to the heart, is the spirit
>>> To the right, far away from the heart, is the science
>>> No bird can ever lift off with wings that are not equal
>>> 
>>> -- Greenland First Nations elder
>>>  quoted in EOS Transactions
>>> 
>>> 
>>> Don McKenzie, Research Ecologist
>>> Pacific WIldland Fire Sciences Lab
>>> US Forest Service
>>> 
>>> Affiliate Professor
>>> School of Forest Resources, College of the Environment
>>> CSES Climate Impacts Group
>>> University of Washington
>>> 
>>> phone: 206-732-7824
>>> d...@uw.edu
>>> 
>>> __
>>> R-help@r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide http://www.R-project.org/
>>>

Re: [R] graph bugs using R on MAC

2011-09-18 Thread bby2103

Don and Duncan,

That function works, up to the same point where I can save pdf into  
Word using the menu. But when I use Identify function together with  
plot function, the Quartz window has to be closed before I can go back  
the console to execute "copy2eps" function. But by then, I don't have  
an active device anymore. So it beats the purpose.


Dan,

I'm using Word 2004. Upgrading Word is an idea. I will definitely look  
into it, although I didn't think those who didn't have this problem  
necessarily had a higher version of Word.


Bonnie Yuan

Quoting Duncan Murdoch :


On 11-09-18 4:53 PM, Don McKenzie wrote:

I think it's actually dev.copy2eps()

or at least that one works.


Right, sorry.

Duncan Murdoch




On 18-Sep-11, at 1:51 PM, Duncan Murdoch wrote:


On 11-09-18 4:11 PM, bby2...@columbia.edu wrote:

Yes, I'm positive I had the right window highlighted, and I have
shown
this problem to lots of people including tech staff, to get no
answers. So I suspect it's probably a somewhat obscure problem.

Duncan, thanks for the lead on the new group. I will follow up on
that. What is the copy2eps? Is it to Excel? Do you get that option
in R?


copy2eps() is a function in R.  Try ?copy2eps for details.

Duncan Murdoch



Bonnie Yuan.

Quoting Duncan Murdoch:


On 11-09-18 3:48 PM, Don McKenzie wrote:


On 18-Sep-11, at 12:38 PM, bby2...@columbia.edu wrote:


This is has been bugging me for a long time. Nobody around me
seems
to have this problem. I hope someone on the forum could help me.

When I generate a R graph and want to bring the image into Word. I
cannot copy and paste it like many of my classmates can do. The
"Select" in Edit menu have all options grayed out.


You want "Copy", not "Select".  Then Paste into your word
processor.


That doesn't work for me with OpenOffice (I don't have Word).
copy2eps(file="some.eps") does work, along with Insert | Picture
| From
file...




So what I ended up doing is to save it as pdf file and bring it
into Word. But if I use "Identify" in the Plot statement, there
will be values labels on the graph when you click on the
observation. For some reason, these labels don't show up in the
pdf
file.


They did show up with copy2eps().  I didn't try copy2pdf(); my
copy of
OpenOffice doesn't recognize .pdf as a picture type.

But Bonnie will probably get a better answer on the R-sig-mac list.

Duncan Murdoch



So the last resort I have is prinscreen, which always have
irrelevant things showing.

I've tried updating R/OS and all softwares on my MAC, but nothing
seems to do anything. I have OX 10.6.8. Does this problem sound
familiar to anyone?

Thanks in advance!

Bonnie Yuan

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-
guide.html
and provide commented, minimal, self-contained, reproducible code.


When we look at the wings of the eagle
To the left, closest to the heart, is the spirit
To the right, far away from the heart, is the science
No bird can ever lift off with wings that are not equal

-- Greenland First Nations elder
  quoted in EOS Transactions


Don McKenzie, Research Ecologist
Pacific WIldland Fire Sciences Lab
US Forest Service

Affiliate Professor
School of Forest Resources, College of the Environment
CSES Climate Impacts Group
University of Washington

phone: 206-732-7824
d...@uw.edu

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/
posting-guide.html
and provide commented, minimal, self-contained, reproducible code.










Don McKenzie, Research Ecologist
Pacific WIldland Fire Sciences Lab
US Forest Service

Affiliate Professor
School of Forest Resources, College of the Environment
CSES Climate Impacts Group
University of Washington

phone: 206-732-7824
d...@uw.edu






__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph bugs using R on MAC

2011-09-18 Thread Duncan Murdoch

On 11-09-18 4:53 PM, Don McKenzie wrote:

I think it's actually dev.copy2eps()

or at least that one works.


Right, sorry.

Duncan Murdoch




On 18-Sep-11, at 1:51 PM, Duncan Murdoch wrote:


On 11-09-18 4:11 PM, bby2...@columbia.edu wrote:

Yes, I'm positive I had the right window highlighted, and I have
shown
this problem to lots of people including tech staff, to get no
answers. So I suspect it's probably a somewhat obscure problem.

Duncan, thanks for the lead on the new group. I will follow up on
that. What is the copy2eps? Is it to Excel? Do you get that option
in R?


copy2eps() is a function in R.  Try ?copy2eps for details.

Duncan Murdoch



Bonnie Yuan.

Quoting Duncan Murdoch:


On 11-09-18 3:48 PM, Don McKenzie wrote:


On 18-Sep-11, at 12:38 PM, bby2...@columbia.edu wrote:


This is has been bugging me for a long time. Nobody around me
seems
to have this problem. I hope someone on the forum could help me.

When I generate a R graph and want to bring the image into Word. I
cannot copy and paste it like many of my classmates can do. The
"Select" in Edit menu have all options grayed out.


You want "Copy", not "Select".  Then Paste into your word
processor.


That doesn't work for me with OpenOffice (I don't have Word).
copy2eps(file="some.eps") does work, along with Insert | Picture
| From
file...




So what I ended up doing is to save it as pdf file and bring it
into Word. But if I use "Identify" in the Plot statement, there
will be values labels on the graph when you click on the
observation. For some reason, these labels don't show up in the
pdf
file.


They did show up with copy2eps().  I didn't try copy2pdf(); my
copy of
OpenOffice doesn't recognize .pdf as a picture type.

But Bonnie will probably get a better answer on the R-sig-mac list.

Duncan Murdoch



So the last resort I have is prinscreen, which always have
irrelevant things showing.

I've tried updating R/OS and all softwares on my MAC, but nothing
seems to do anything. I have OX 10.6.8. Does this problem sound
familiar to anyone?

Thanks in advance!

Bonnie Yuan

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-
guide.html
and provide commented, minimal, self-contained, reproducible code.


When we look at the wings of the eagle
To the left, closest to the heart, is the spirit
To the right, far away from the heart, is the science
No bird can ever lift off with wings that are not equal

-- Greenland First Nations elder
   quoted in EOS Transactions


Don McKenzie, Research Ecologist
Pacific WIldland Fire Sciences Lab
US Forest Service

Affiliate Professor
School of Forest Resources, College of the Environment
CSES Climate Impacts Group
University of Washington

phone: 206-732-7824
d...@uw.edu

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/
posting-guide.html
and provide commented, minimal, self-contained, reproducible code.










Don McKenzie, Research Ecologist
Pacific WIldland Fire Sciences Lab
US Forest Service

Affiliate Professor
School of Forest Resources, College of the Environment
CSES Climate Impacts Group
University of Washington

phone: 206-732-7824
d...@uw.edu






__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph bugs using R on MAC

2011-09-18 Thread Don McKenzie

I think it's actually dev.copy2eps()

or at least that one works.


On 18-Sep-11, at 1:51 PM, Duncan Murdoch wrote:


On 11-09-18 4:11 PM, bby2...@columbia.edu wrote:
Yes, I'm positive I had the right window highlighted, and I have  
shown

this problem to lots of people including tech staff, to get no
answers. So I suspect it's probably a somewhat obscure problem.

Duncan, thanks for the lead on the new group. I will follow up on
that. What is the copy2eps? Is it to Excel? Do you get that option  
in R?


copy2eps() is a function in R.  Try ?copy2eps for details.

Duncan Murdoch



Bonnie Yuan.

Quoting Duncan Murdoch:


On 11-09-18 3:48 PM, Don McKenzie wrote:


On 18-Sep-11, at 12:38 PM, bby2...@columbia.edu wrote:

This is has been bugging me for a long time. Nobody around me  
seems

to have this problem. I hope someone on the forum could help me.

When I generate a R graph and want to bring the image into Word. I
cannot copy and paste it like many of my classmates can do. The
"Select" in Edit menu have all options grayed out.


You want "Copy", not "Select".  Then Paste into your word  
processor.


That doesn't work for me with OpenOffice (I don't have Word).
copy2eps(file="some.eps") does work, along with Insert | Picture  
| From

file...




So what I ended up doing is to save it as pdf file and bring it
into Word. But if I use "Identify" in the Plot statement, there
will be values labels on the graph when you click on the
observation. For some reason, these labels don't show up in the  
pdf

file.


They did show up with copy2eps().  I didn't try copy2pdf(); my  
copy of

OpenOffice doesn't recognize .pdf as a picture type.

But Bonnie will probably get a better answer on the R-sig-mac list.

Duncan Murdoch



So the last resort I have is prinscreen, which always have
irrelevant things showing.

I've tried updating R/OS and all softwares on my MAC, but nothing
seems to do anything. I have OX 10.6.8. Does this problem sound
familiar to anyone?

Thanks in advance!

Bonnie Yuan

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-
guide.html
and provide commented, minimal, self-contained, reproducible code.


When we look at the wings of the eagle
To the left, closest to the heart, is the spirit
To the right, far away from the heart, is the science
No bird can ever lift off with wings that are not equal

-- Greenland First Nations elder
  quoted in EOS Transactions


Don McKenzie, Research Ecologist
Pacific WIldland Fire Sciences Lab
US Forest Service

Affiliate Professor
School of Forest Resources, College of the Environment
CSES Climate Impacts Group
University of Washington

phone: 206-732-7824
d...@uw.edu

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/ 
posting-guide.html

and provide commented, minimal, self-contained, reproducible code.










Don McKenzie, Research Ecologist
Pacific WIldland Fire Sciences Lab
US Forest Service

Affiliate Professor
School of Forest Resources, College of the Environment
CSES Climate Impacts Group
University of Washington

phone: 206-732-7824
d...@uw.edu

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph bugs using R on MAC

2011-09-18 Thread Duncan Murdoch

On 11-09-18 4:11 PM, bby2...@columbia.edu wrote:

Yes, I'm positive I had the right window highlighted, and I have shown
this problem to lots of people including tech staff, to get no
answers. So I suspect it's probably a somewhat obscure problem.

Duncan, thanks for the lead on the new group. I will follow up on
that. What is the copy2eps? Is it to Excel? Do you get that option in R?


copy2eps() is a function in R.  Try ?copy2eps for details.

Duncan Murdoch



Bonnie Yuan.

Quoting Duncan Murdoch:


On 11-09-18 3:48 PM, Don McKenzie wrote:


On 18-Sep-11, at 12:38 PM, bby2...@columbia.edu wrote:


This is has been bugging me for a long time. Nobody around me seems
to have this problem. I hope someone on the forum could help me.

When I generate a R graph and want to bring the image into Word. I
cannot copy and paste it like many of my classmates can do. The
"Select" in Edit menu have all options grayed out.


You want "Copy", not "Select".  Then Paste into your word processor.


That doesn't work for me with OpenOffice (I don't have Word).
copy2eps(file="some.eps") does work, along with Insert | Picture | From
file...




So what I ended up doing is to save it as pdf file and bring it
into Word. But if I use "Identify" in the Plot statement, there
will be values labels on the graph when you click on the
observation. For some reason, these labels don't show up in the pdf
file.


They did show up with copy2eps().  I didn't try copy2pdf(); my copy of
OpenOffice doesn't recognize .pdf as a picture type.

But Bonnie will probably get a better answer on the R-sig-mac list.

Duncan Murdoch



So the last resort I have is prinscreen, which always have
irrelevant things showing.

I've tried updating R/OS and all softwares on my MAC, but nothing
seems to do anything. I have OX 10.6.8. Does this problem sound
familiar to anyone?

Thanks in advance!

Bonnie Yuan

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-
guide.html
and provide commented, minimal, self-contained, reproducible code.


When we look at the wings of the eagle
To the left, closest to the heart, is the spirit
To the right, far away from the heart, is the science
No bird can ever lift off with wings that are not equal

-- Greenland First Nations elder
  quoted in EOS Transactions


Don McKenzie, Research Ecologist
Pacific WIldland Fire Sciences Lab
US Forest Service

Affiliate Professor
School of Forest Resources, College of the Environment
CSES Climate Impacts Group
University of Washington

phone: 206-732-7824
d...@uw.edu

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.





__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph bugs using R on MAC

2011-09-18 Thread bby2103
Yes, I'm positive I had the right window highlighted, and I have shown  
this problem to lots of people including tech staff, to get no  
answers. So I suspect it's probably a somewhat obscure problem.


Duncan, thanks for the lead on the new group. I will follow up on  
that. What is the copy2eps? Is it to Excel? Do you get that option in R?


Bonnie Yuan.

Quoting Duncan Murdoch :


On 11-09-18 3:48 PM, Don McKenzie wrote:


On 18-Sep-11, at 12:38 PM, bby2...@columbia.edu wrote:


This is has been bugging me for a long time. Nobody around me seems
to have this problem. I hope someone on the forum could help me.

When I generate a R graph and want to bring the image into Word. I
cannot copy and paste it like many of my classmates can do. The
"Select" in Edit menu have all options grayed out.


You want "Copy", not "Select".  Then Paste into your word processor.


That doesn't work for me with OpenOffice (I don't have Word).
copy2eps(file="some.eps") does work, along with Insert | Picture | From
file...




So what I ended up doing is to save it as pdf file and bring it
into Word. But if I use "Identify" in the Plot statement, there
will be values labels on the graph when you click on the
observation. For some reason, these labels don't show up in the pdf
file.


They did show up with copy2eps().  I didn't try copy2pdf(); my copy of
OpenOffice doesn't recognize .pdf as a picture type.

But Bonnie will probably get a better answer on the R-sig-mac list.

Duncan Murdoch



So the last resort I have is prinscreen, which always have
irrelevant things showing.

I've tried updating R/OS and all softwares on my MAC, but nothing
seems to do anything. I have OX 10.6.8. Does this problem sound
familiar to anyone?

Thanks in advance!

Bonnie Yuan

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-
guide.html
and provide commented, minimal, self-contained, reproducible code.


When we look at the wings of the eagle
To the left, closest to the heart, is the spirit
To the right, far away from the heart, is the science
No bird can ever lift off with wings that are not equal

-- Greenland First Nations elder
 quoted in EOS Transactions


Don McKenzie, Research Ecologist
Pacific WIldland Fire Sciences Lab
US Forest Service

Affiliate Professor
School of Forest Resources, College of the Environment
CSES Climate Impacts Group
University of Washington

phone: 206-732-7824
d...@uw.edu

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph bugs using R on MAC

2011-09-18 Thread Don McKenzie


On 18-Sep-11, at 12:59 PM, Duncan Murdoch wrote:


On 11-09-18 3:48 PM, Don McKenzie wrote:


On 18-Sep-11, at 12:38 PM, bby2...@columbia.edu wrote:


This is has been bugging me for a long time. Nobody around me seems
to have this problem. I hope someone on the forum could help me.

When I generate a R graph and want to bring the image into Word. I
cannot copy and paste it like many of my classmates can do. The
"Select" in Edit menu have all options grayed out.


You want "Copy", not "Select".  Then Paste into your word processor.


That doesn't work for me with OpenOffice (I don't have Word).  
copy2eps(file="some.eps") does work, along with Insert | Picture |  
From file...


Odd -- I was using OpenOffice when trying to duplicate the problem.   
Well NeoOffice, the mac twin.





So what I ended up doing is to save it as pdf file and bring it
into Word. But if I use "Identify" in the Plot statement, there
will be values labels on the graph when you click on the
observation. For some reason, these labels don't show up in the pdf
file.


They did show up with copy2eps().  I didn't try copy2pdf(); my copy  
of OpenOffice doesn't recognize .pdf as a picture type.


But Bonnie will probably get a better answer on the R-sig-mac list.

Duncan Murdoch



So the last resort I have is prinscreen, which always have
irrelevant things showing.

I've tried updating R/OS and all softwares on my MAC, but nothing
seems to do anything. I have OX 10.6.8. Does this problem sound
familiar to anyone?

Thanks in advance!

Bonnie Yuan

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-
guide.html
and provide commented, minimal, self-contained, reproducible code.


When we look at the wings of the eagle
To the left, closest to the heart, is the spirit
To the right, far away from the heart, is the science
No bird can ever lift off with wings that are not equal

-- Greenland First Nations elder
  quoted in EOS Transactions


Don McKenzie, Research Ecologist
Pacific WIldland Fire Sciences Lab
US Forest Service

Affiliate Professor
School of Forest Resources, College of the Environment
CSES Climate Impacts Group
University of Washington

phone: 206-732-7824
d...@uw.edu

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting- 
guide.html

and provide commented, minimal, self-contained, reproducible code.







Don McKenzie, Research Ecologist
Pacific WIldland Fire Sciences Lab
US Forest Service

Affiliate Professor
School of Forest Resources, College of the Environment
CSES Climate Impacts Group
University of Washington

phone: 206-732-7824
d...@uw.edu

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph bugs using R on MAC

2011-09-18 Thread Duncan Murdoch

On 11-09-18 3:48 PM, Don McKenzie wrote:


On 18-Sep-11, at 12:38 PM, bby2...@columbia.edu wrote:


This is has been bugging me for a long time. Nobody around me seems
to have this problem. I hope someone on the forum could help me.

When I generate a R graph and want to bring the image into Word. I
cannot copy and paste it like many of my classmates can do. The
"Select" in Edit menu have all options grayed out.


You want "Copy", not "Select".  Then Paste into your word processor.


That doesn't work for me with OpenOffice (I don't have Word). 
copy2eps(file="some.eps") does work, along with Insert | Picture | From 
file...





So what I ended up doing is to save it as pdf file and bring it
into Word. But if I use "Identify" in the Plot statement, there
will be values labels on the graph when you click on the
observation. For some reason, these labels don't show up in the pdf
file.


They did show up with copy2eps().  I didn't try copy2pdf(); my copy of 
OpenOffice doesn't recognize .pdf as a picture type.


But Bonnie will probably get a better answer on the R-sig-mac list.

Duncan Murdoch



So the last resort I have is prinscreen, which always have
irrelevant things showing.

I've tried updating R/OS and all softwares on my MAC, but nothing
seems to do anything. I have OX 10.6.8. Does this problem sound
familiar to anyone?

Thanks in advance!

Bonnie Yuan

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-
guide.html
and provide commented, minimal, self-contained, reproducible code.


When we look at the wings of the eagle
To the left, closest to the heart, is the spirit
To the right, far away from the heart, is the science
No bird can ever lift off with wings that are not equal

-- Greenland First Nations elder
  quoted in EOS Transactions


Don McKenzie, Research Ecologist
Pacific WIldland Fire Sciences Lab
US Forest Service

Affiliate Professor
School of Forest Resources, College of the Environment
CSES Climate Impacts Group
University of Washington

phone: 206-732-7824
d...@uw.edu

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph bugs using R on MAC

2011-09-18 Thread B77S
Have you been shown how to save a graph as a JPEG or PNG?

try this:

png("myGraph.png")
plot(your_data)
dev.off()

A png will appear in your working directory, which can be imported into the
Word document.
You can do the same with a JPEG

see ?jpeg or ?png and ?dev.off

HTH
 


bonnieyuan wrote:
> 
> This is has been bugging me for a long time. Nobody around me seems to  
> have this problem. I hope someone on the forum could help me.
> 
> When I generate a R graph and want to bring the image into Word. I  
> cannot copy and paste it like many of my classmates can do. The  
> "Select" in Edit menu have all options grayed out. So what I ended up  
> doing is to save it as pdf file and bring it into Word. But if I use  
> "Identify" in the Plot statement, there will be values labels on the  
> graph when you click on the observation. For some reason, these labels  
> don't show up in the pdf file.
> 
> So the last resort I have is prinscreen, which always have irrelevant  
> things showing.
> 
> I've tried updating R/OS and all softwares on my MAC, but nothing  
> seems to do anything. I have OX 10.6.8. Does this problem sound  
> familiar to anyone?
> 
> Thanks in advance!
> 
> Bonnie Yuan
> 
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 


--
View this message in context: 
http://r.789695.n4.nabble.com/graph-bugs-using-R-on-MAC-tp3822460p3822480.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph bugs using R on MAC

2011-09-18 Thread bby2103
Copy paste doesn't work. So I tried to Select and then copy paste, but  
it doesn't work either.


Quoting Don McKenzie :



On 18-Sep-11, at 12:38 PM, bby2...@columbia.edu wrote:

This is has been bugging me for a long time. Nobody around me seems  
 to have this problem. I hope someone on the forum could help me.


When I generate a R graph and want to bring the image into Word. I   
cannot copy and paste it like many of my classmates can do. The   
"Select" in Edit menu have all options grayed out.


You want "Copy", not "Select".  Then Paste into your word processor.

So what I ended up doing is to save it as pdf file and bring it   
into Word. But if I use "Identify" in the Plot statement, there   
will be values labels on the graph when you click on the   
observation. For some reason, these labels don't show up in the pdf  
 file.


So the last resort I have is prinscreen, which always have   
irrelevant things showing.


I've tried updating R/OS and all softwares on my MAC, but nothing   
seems to do anything. I have OX 10.6.8. Does this problem sound   
familiar to anyone?


Thanks in advance!

Bonnie Yuan

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


When we look at the wings of the eagle
To the left, closest to the heart, is the spirit
To the right, far away from the heart, is the science
No bird can ever lift off with wings that are not equal

-- Greenland First Nations elder
quoted in EOS Transactions


Don McKenzie, Research Ecologist
Pacific WIldland Fire Sciences Lab
US Forest Service

Affiliate Professor
School of Forest Resources, College of the Environment
CSES Climate Impacts Group
University of Washington

phone: 206-732-7824
d...@uw.edu


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph bugs using R on MAC

2011-09-18 Thread Don McKenzie


On 18-Sep-11, at 12:38 PM, bby2...@columbia.edu wrote:

This is has been bugging me for a long time. Nobody around me seems  
to have this problem. I hope someone on the forum could help me.


When I generate a R graph and want to bring the image into Word. I  
cannot copy and paste it like many of my classmates can do. The  
"Select" in Edit menu have all options grayed out.


You want "Copy", not "Select".  Then Paste into your word processor.

So what I ended up doing is to save it as pdf file and bring it  
into Word. But if I use "Identify" in the Plot statement, there  
will be values labels on the graph when you click on the  
observation. For some reason, these labels don't show up in the pdf  
file.


So the last resort I have is prinscreen, which always have  
irrelevant things showing.


I've tried updating R/OS and all softwares on my MAC, but nothing  
seems to do anything. I have OX 10.6.8. Does this problem sound  
familiar to anyone?


Thanks in advance!

Bonnie Yuan

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting- 
guide.html

and provide commented, minimal, self-contained, reproducible code.


When we look at the wings of the eagle
To the left, closest to the heart, is the spirit
To the right, far away from the heart, is the science
No bird can ever lift off with wings that are not equal

-- Greenland First Nations elder
quoted in EOS Transactions


Don McKenzie, Research Ecologist
Pacific WIldland Fire Sciences Lab
US Forest Service

Affiliate Professor
School of Forest Resources, College of the Environment
CSES Climate Impacts Group
University of Washington

phone: 206-732-7824
d...@uw.edu

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] "graph"

2011-09-18 Thread David Winsemius


On Sep 17, 2011, at 10:45 PM, Sandy Mitchell wrote:



Hello,


I have downloaded  "graph" package  from 
http://www.bioconductor.org/packages/release/bioc/html/graph.html

Is there anyone who can teach me how to install "graph" into R?



What happens when you follow the instructions on that page? (They are  
right at the top.)


--

David Winsemius, MD
West Hartford, CT

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] "graph"

2011-09-18 Thread Reza Salimi-Khorshidi
Hi Sandy,
This might help:
http://stackoverflow.com/questions/1474081/how-do-i-install-an-r-package-from-source

Best, Reza

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph many points without hiding some

2011-04-03 Thread Samuel Dennis
Thanks heaps for all your help, sorry for the late reply, I'm a bit
overwhelmed by all the possibilities here!

My variables have different lengths which makes automated randomisation
difficult Peter, although not impossible. Thanks for the suggestion of 3D
graphs Nick, I'm not sure how I can make it work with this particular
project but I'll keep it in mind for the future.

I'll try to get this working with transparancy in base graphics (thanks
Claudia and Greg), but if that doesn't cut it I'll have to learn ggplot2 -
which looks like a good idea anyway as I am very impressed with what it can
do. Thankyou Dennis in particular for translating my code into ggplot, this
will be a great help as I get started.

Samuel


On 1 April 2011 05:07, Greg Snow  wrote:

> Just a note, Base graphics does support transparency as long as the device
> plotting to supports it.
>
> --
> Gregory (Greg) L. Snow Ph.D.
> Statistical Data Center
> Intermountain Healthcare
> greg.s...@imail.org
> 801.408.8111
>
>
> > -Original Message-
> > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> > project.org] On Behalf Of Dennis Murphy
> > Sent: Thursday, March 31, 2011 1:36 AM
> > To: Samuel Dennis
> > Cc: R-help@r-project.org
> > Subject: Re: [R] Graph many points without hiding some
> >
> > Hi:
> >
> > I can think of a couple: (1) size reduction of the points; (2) alpha
> > transparency; (3)  (1) + (2)
> >
> > >From your original plot in base graphics, I reduced cex to 0.2 and it
> > didn't
> > look too bad:
> >
> > plot(rnorm(x,mean=19),rnorm(x),col=3,xlim=c(16,24), cex = 0.2)
> > points(rnorm(x,mean=20),rnorm(x),col=1, cex = 0.2)
> > points(rnorm(x,mean=21),rnorm(x),col=2, cex = 0.2)
> >
> > AFAIK, base graphics doesn't have alpha transparency available, but the
> > ggplot2 package does. One approach is to adjust the alpha transparency
> > on
> > default size points; another is to combine reduced point size with
> > alpha
> > transparency. Here is your example rehashed for ggplot2.
> >
> > require(ggplot2)
> > d <- data.frame(x1 = rnorm(1, mean = 19), x2 = rnorm(1, mean =
> > 20),
> > x3 = rnorm(1, mean = 21), x = rnorm(1))
> > # Basically stacking x1 - x3, creating two new vars named variable and
> > value
> > dm <- melt(d, id = 'x')   # from reshape package, loads with ggplot2
> > # Alpha transparency is set to a low level with default point size,
> > # but the colors in the legend are muted by the level of transparency
> > ggplot(dm, aes(x = x, y = value, colour = variable)) + theme_bw() +
> >geom_point(alpha = 0.05) +
> >scale_colour_manual(values = c('x1' = 'black',
> >   'x2' = 'red', 'x3' = 'green'))
> >
> > # A tradeoff is to reduce the point size and increase alpha a bit, but
> > these
> > changes will
> > # also be reflected in the legend.
> >
> > ggplot(dm, aes(x = x, y = value, colour = variable)) + theme_bw() +
> >geom_point(alpha = 0.15, size = 1) +
> >scale_colour_manual(values = c('x1' = 'black',
> >   'x2' = 'red', 'x3' = 'green'))
> >
> > You may well find the legend to be useless for this example, so to get
> > rid
> > of it,
> >
> > ggplot(dm, aes(x = x, y = value, colour = variable)) + theme_bw() +
> >geom_point(alpha = 0.15, size = 1) +
> >scale_colour_manual(values = c('x1' = 'black',
> >   'x2' = 'red', 'x3' = 'green')) +
> >opts(legend.position = 'none')
> >
> > The nice thing about the ggplot2 graph is that you can adjust the point
> > size
> > and alpha transparency to your tastes. The default point size is 2 and
> > the
> > default alpha = 1 (no transparency).
> >
> > HTH,
> > Dennis
> >
> > On Wed, Mar 30, 2011 at 10:04 PM, Samuel Dennis 
> > wrote:
> >
> > > I have a very large dataset with three variables that I need to graph
> > using
> > > a scatterplot. However I find that the first variable gets masked by
> > the
> > > other two, so the graph looks entirely different depending on the
> > order of
> > > variables. Does anyone have any suggestions how to manage this?
> > >
> > > This code is an illustration of what I am dealing with:
> 

Re: [R] Graph many points without hiding some

2011-03-31 Thread Greg Snow
Just a note, Base graphics does support transparency as long as the device 
plotting to supports it.

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111


> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Dennis Murphy
> Sent: Thursday, March 31, 2011 1:36 AM
> To: Samuel Dennis
> Cc: R-help@r-project.org
> Subject: Re: [R] Graph many points without hiding some
> 
> Hi:
> 
> I can think of a couple: (1) size reduction of the points; (2) alpha
> transparency; (3)  (1) + (2)
> 
> >From your original plot in base graphics, I reduced cex to 0.2 and it
> didn't
> look too bad:
> 
> plot(rnorm(x,mean=19),rnorm(x),col=3,xlim=c(16,24), cex = 0.2)
> points(rnorm(x,mean=20),rnorm(x),col=1, cex = 0.2)
> points(rnorm(x,mean=21),rnorm(x),col=2, cex = 0.2)
> 
> AFAIK, base graphics doesn't have alpha transparency available, but the
> ggplot2 package does. One approach is to adjust the alpha transparency
> on
> default size points; another is to combine reduced point size with
> alpha
> transparency. Here is your example rehashed for ggplot2.
> 
> require(ggplot2)
> d <- data.frame(x1 = rnorm(1, mean = 19), x2 = rnorm(1, mean =
> 20),
> x3 = rnorm(1, mean = 21), x = rnorm(1))
> # Basically stacking x1 - x3, creating two new vars named variable and
> value
> dm <- melt(d, id = 'x')   # from reshape package, loads with ggplot2
> # Alpha transparency is set to a low level with default point size,
> # but the colors in the legend are muted by the level of transparency
> ggplot(dm, aes(x = x, y = value, colour = variable)) + theme_bw() +
>geom_point(alpha = 0.05) +
>scale_colour_manual(values = c('x1' = 'black',
>   'x2' = 'red', 'x3' = 'green'))
> 
> # A tradeoff is to reduce the point size and increase alpha a bit, but
> these
> changes will
> # also be reflected in the legend.
> 
> ggplot(dm, aes(x = x, y = value, colour = variable)) + theme_bw() +
>geom_point(alpha = 0.15, size = 1) +
>scale_colour_manual(values = c('x1' = 'black',
>   'x2' = 'red', 'x3' = 'green'))
> 
> You may well find the legend to be useless for this example, so to get
> rid
> of it,
> 
> ggplot(dm, aes(x = x, y = value, colour = variable)) + theme_bw() +
>geom_point(alpha = 0.15, size = 1) +
>scale_colour_manual(values = c('x1' = 'black',
>   'x2' = 'red', 'x3' = 'green')) +
>opts(legend.position = 'none')
> 
> The nice thing about the ggplot2 graph is that you can adjust the point
> size
> and alpha transparency to your tastes. The default point size is 2 and
> the
> default alpha = 1 (no transparency).
> 
> HTH,
> Dennis
> 
> On Wed, Mar 30, 2011 at 10:04 PM, Samuel Dennis 
> wrote:
> 
> > I have a very large dataset with three variables that I need to graph
> using
> > a scatterplot. However I find that the first variable gets masked by
> the
> > other two, so the graph looks entirely different depending on the
> order of
> > variables. Does anyone have any suggestions how to manage this?
> >
> > This code is an illustration of what I am dealing with:
> >
> > x <- 1
> > plot(rnorm(x,mean=20),rnorm(x),col=1,xlim=c(16,24))
> > points(rnorm(x,mean=21),rnorm(x),col=2)
> > points(rnorm(x,mean=19),rnorm(x),col=3)
> >
> > gives an entirely different looking graph to:
> >
> > x <- 1
> > plot(rnorm(x,mean=19),rnorm(x),col=3,xlim=c(16,24))
> > points(rnorm(x,mean=20),rnorm(x),col=1)
> > points(rnorm(x,mean=21),rnorm(x),col=2)
> >
> > despite being identical in all respects except for the order in which
> the
> > variables are plotted.
> >
> > I have tried using pch=".", however the colours are very difficult to
> > discern. I have experimented with a number of other symbols with no
> real
> > solution.
> >
> > The only way that appears to work is to iterate the plot with a for
> loop,
> > and progressively add a few numbers from each variable, as below.
> However
> > although I can do this simply with random numbers as I have done
> here, this
> > is an extremely cumbersome method to use with real datasets.
> >
> > plot(1,1,xlim=c(16,24),ylim=c(-4,4),col="white")
> > x <- 100

Re: [R] Graph many points without hiding some

2011-03-31 Thread Nick Sabbe
Hi.
You could also turn it into a 3D plot with some variation on the function
below:
plot4d<-function(x,y,z, u, main="", xlab="", ylab="", zlab="", ulab="")
{
require(rgl)#may need to install this package first

#standard trick to get some intensity colors
uLim<-range(u)
uLen<-uLim[2] - uLim[1] + 1
colorlut<-terrain.colors(uLen)
col<-colorlut[u - uLim[1] + 1]

open3d()#Open new device
points3d(x=x, y=y, z=z,  col=col)
aspect3d(x=1, y=1, z=1) #ensure bounding box is in cube-form
(scaling variables)
#note: if you want to flip an axis, use -1 in the statement above

axes3d() #Show axes
title3d(main = main, sub=paste("Green is low", ulab, ", red is
high")
xlab = xlab, ylab = ylab, zlab = zlab)
}

HTH,


Nick Sabbe
--
ping: nick.sa...@ugent.be
link: http://biomath.ugent.be
wink: A1.056, Coupure Links 653, 9000 Gent
ring: 09/264.59.36

-- Do Not Disapprove




-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Peter Langfelder
Sent: donderdag 31 maart 2011 9:26
To: Samuel Dennis
Cc: R-help@r-project.org
Subject: Re: [R] Graph many points without hiding some

On Wed, Mar 30, 2011 at 10:04 PM, Samuel Dennis  wrote:
> I have a very large dataset with three variables that I need to graph
using
> a scatterplot. However I find that the first variable gets masked by the
> other two, so the graph looks entirely different depending on the order of
> variables. Does anyone have any suggestions how to manage this?
>
> This code is an illustration of what I am dealing with:
>
> x <- 1
> plot(rnorm(x,mean=20),rnorm(x),col=1,xlim=c(16,24))
> points(rnorm(x,mean=21),rnorm(x),col=2)
> points(rnorm(x,mean=19),rnorm(x),col=3)
>
> gives an entirely different looking graph to:
>
> x <- 1
> plot(rnorm(x,mean=19),rnorm(x),col=3,xlim=c(16,24))
> points(rnorm(x,mean=20),rnorm(x),col=1)
> points(rnorm(x,mean=21),rnorm(x),col=2)
>
> despite being identical in all respects except for the order in which the
> variables are plotted.
>
> I have tried using pch=".", however the colours are very difficult to
> discern. I have experimented with a number of other symbols with no real
> solution.
>
> The only way that appears to work is to iterate the plot with a for loop,
> and progressively add a few numbers from each variable, as below. However
> although I can do this simply with random numbers as I have done here,
this
> is an extremely cumbersome method to use with real datasets.
>
> plot(1,1,xlim=c(16,24),ylim=c(-4,4),col="white")
> x <- 100
> for (i in 1:100) {
> points(rnorm(x,mean=19),rnorm(x),col=3)
> points(rnorm(x,mean=20),rnorm(x),col=1)
> points(rnorm(x,mean=21),rnorm(x),col=2)
> }
>
> Is there some function in R that could solve this through automatically
> iterating my data as above, using transparent symbols, or something else?
Is
> there some other way of solving this issue that I haven't thought of?

Assume you are plotting variables y1, y2, y3 of the same length
against a common x, and you would like to assign colors say c(1,2,3).
You can automate the randomization of order as follows:

n = length(y1);
y = c(y1, y2, y3);
xx = rep(x, 3);
colors = rep(c(1,2,3), c(n, n, n));

order = sample(c(1:(3*n)));

plot(xx[order], y[order], col= colors[order])

I basically turn the y's into a single vector y with the corresponding
values of x stored in xx and the plotting colors, then randomize the
order using the sample function.

HTH,

Peter

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph many points without hiding some

2011-03-31 Thread Dennis Murphy
Hi:

I can think of a couple: (1) size reduction of the points; (2) alpha
transparency; (3)  (1) + (2)

>From your original plot in base graphics, I reduced cex to 0.2 and it didn't
look too bad:

plot(rnorm(x,mean=19),rnorm(x),col=3,xlim=c(16,24), cex = 0.2)
points(rnorm(x,mean=20),rnorm(x),col=1, cex = 0.2)
points(rnorm(x,mean=21),rnorm(x),col=2, cex = 0.2)

AFAIK, base graphics doesn't have alpha transparency available, but the
ggplot2 package does. One approach is to adjust the alpha transparency on
default size points; another is to combine reduced point size with alpha
transparency. Here is your example rehashed for ggplot2.

require(ggplot2)
d <- data.frame(x1 = rnorm(1, mean = 19), x2 = rnorm(1, mean = 20),
x3 = rnorm(1, mean = 21), x = rnorm(1))
# Basically stacking x1 - x3, creating two new vars named variable and value
dm <- melt(d, id = 'x')   # from reshape package, loads with ggplot2
# Alpha transparency is set to a low level with default point size,
# but the colors in the legend are muted by the level of transparency
ggplot(dm, aes(x = x, y = value, colour = variable)) + theme_bw() +
   geom_point(alpha = 0.05) +
   scale_colour_manual(values = c('x1' = 'black',
  'x2' = 'red', 'x3' = 'green'))

# A tradeoff is to reduce the point size and increase alpha a bit, but these
changes will
# also be reflected in the legend.

ggplot(dm, aes(x = x, y = value, colour = variable)) + theme_bw() +
   geom_point(alpha = 0.15, size = 1) +
   scale_colour_manual(values = c('x1' = 'black',
  'x2' = 'red', 'x3' = 'green'))

You may well find the legend to be useless for this example, so to get rid
of it,

ggplot(dm, aes(x = x, y = value, colour = variable)) + theme_bw() +
   geom_point(alpha = 0.15, size = 1) +
   scale_colour_manual(values = c('x1' = 'black',
  'x2' = 'red', 'x3' = 'green')) +
   opts(legend.position = 'none')

The nice thing about the ggplot2 graph is that you can adjust the point size
and alpha transparency to your tastes. The default point size is 2 and the
default alpha = 1 (no transparency).

HTH,
Dennis

On Wed, Mar 30, 2011 at 10:04 PM, Samuel Dennis  wrote:

> I have a very large dataset with three variables that I need to graph using
> a scatterplot. However I find that the first variable gets masked by the
> other two, so the graph looks entirely different depending on the order of
> variables. Does anyone have any suggestions how to manage this?
>
> This code is an illustration of what I am dealing with:
>
> x <- 1
> plot(rnorm(x,mean=20),rnorm(x),col=1,xlim=c(16,24))
> points(rnorm(x,mean=21),rnorm(x),col=2)
> points(rnorm(x,mean=19),rnorm(x),col=3)
>
> gives an entirely different looking graph to:
>
> x <- 1
> plot(rnorm(x,mean=19),rnorm(x),col=3,xlim=c(16,24))
> points(rnorm(x,mean=20),rnorm(x),col=1)
> points(rnorm(x,mean=21),rnorm(x),col=2)
>
> despite being identical in all respects except for the order in which the
> variables are plotted.
>
> I have tried using pch=".", however the colours are very difficult to
> discern. I have experimented with a number of other symbols with no real
> solution.
>
> The only way that appears to work is to iterate the plot with a for loop,
> and progressively add a few numbers from each variable, as below. However
> although I can do this simply with random numbers as I have done here, this
> is an extremely cumbersome method to use with real datasets.
>
> plot(1,1,xlim=c(16,24),ylim=c(-4,4),col="white")
> x <- 100
> for (i in 1:100) {
> points(rnorm(x,mean=19),rnorm(x),col=3)
> points(rnorm(x,mean=20),rnorm(x),col=1)
> points(rnorm(x,mean=21),rnorm(x),col=2)
> }
>
> Is there some function in R that could solve this through automatically
> iterating my data as above, using transparent symbols, or something else?
> Is
> there some other way of solving this issue that I haven't thought of?
>
> Thankyou,
>
> Samuel Dennis
>
>[[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph many points without hiding some

2011-03-31 Thread Peter Langfelder
On Wed, Mar 30, 2011 at 10:04 PM, Samuel Dennis  wrote:
> I have a very large dataset with three variables that I need to graph using
> a scatterplot. However I find that the first variable gets masked by the
> other two, so the graph looks entirely different depending on the order of
> variables. Does anyone have any suggestions how to manage this?
>
> This code is an illustration of what I am dealing with:
>
> x <- 1
> plot(rnorm(x,mean=20),rnorm(x),col=1,xlim=c(16,24))
> points(rnorm(x,mean=21),rnorm(x),col=2)
> points(rnorm(x,mean=19),rnorm(x),col=3)
>
> gives an entirely different looking graph to:
>
> x <- 1
> plot(rnorm(x,mean=19),rnorm(x),col=3,xlim=c(16,24))
> points(rnorm(x,mean=20),rnorm(x),col=1)
> points(rnorm(x,mean=21),rnorm(x),col=2)
>
> despite being identical in all respects except for the order in which the
> variables are plotted.
>
> I have tried using pch=".", however the colours are very difficult to
> discern. I have experimented with a number of other symbols with no real
> solution.
>
> The only way that appears to work is to iterate the plot with a for loop,
> and progressively add a few numbers from each variable, as below. However
> although I can do this simply with random numbers as I have done here, this
> is an extremely cumbersome method to use with real datasets.
>
> plot(1,1,xlim=c(16,24),ylim=c(-4,4),col="white")
> x <- 100
> for (i in 1:100) {
> points(rnorm(x,mean=19),rnorm(x),col=3)
> points(rnorm(x,mean=20),rnorm(x),col=1)
> points(rnorm(x,mean=21),rnorm(x),col=2)
> }
>
> Is there some function in R that could solve this through automatically
> iterating my data as above, using transparent symbols, or something else? Is
> there some other way of solving this issue that I haven't thought of?

Assume you are plotting variables y1, y2, y3 of the same length
against a common x, and you would like to assign colors say c(1,2,3).
You can automate the randomization of order as follows:

n = length(y1);
y = c(y1, y2, y3);
xx = rep(x, 3);
colors = rep(c(1,2,3), c(n, n, n));

order = sample(c(1:(3*n)));

plot(xx[order], y[order], col= colors[order])

I basically turn the y's into a single vector y with the corresponding
values of x stored in xx and the plotting colors, then randomize the
order using the sample function.

HTH,

Peter

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph lines don;t appear

2011-03-16 Thread Sara Szeremeta
The values appear, indeed, however the grid has now shifted so that it is
not aligned with the ticks on the axes. I'm using
grid(nx=NULL, ny=NULL)
that should do the trick to follow the axes' ticks, but it does not.

I would appreciate any sugestions how to solve it.

Regards,
Sara



pln <- read.table(file="PLN.txt", header=TRUE, dec=",")
#colClasess=c("Date", NA, NA)
FORplot <- ts(pln[,1], end=c(2011,8), freq=52)

plot(FORplot, type="l", lwd="1", ylab="EUR/PLN", xlab=NULL, xlim=c(1993,
2011), ylim = c(2, 5), panel.first = grid(nx=NULL, ny=NULL))

2011/3/16 Sara Szeremeta 

> Thanks a lot!! It helped!
>
>
> 2011/3/15 Sara Szeremeta 
>
>> Hi
>>
>>  I am trying to plot two simple graphs with a grid in background. The axis
>> and grid appears in correct position, but the actual data are not there
>>  Can somebody provide me a hint what is missing?
>>
>>  The code is:
>>
>> pln <- read.table(file="PLN.txt", header=TRUE, dec=",")
>> par(mfrow=c(1,2))
>> plot(pln[,1], type="l", lwd="2", ylab="EUR/PLN", xlab=NULL, xlim = c(1993,
>> 2011), ylim = c(2, 5),  panel.first = grid(nx=NULL, ny=NULL))
>> plot(log(pln[,1]), type="l", ylab="EUR/PLN", xlab=NULL, xlim = c(1993,
>> 2011), panel.first = grid(equilogs = FALSE))
>>
>>  Cheers.
>>  Sara
>>
>
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph lines don;t appear

2011-03-16 Thread Sara Szeremeta
Thanks a lot!! It helped!

2011/3/15 Sara Szeremeta 

> Hi
>
>  I am trying to plot two simple graphs with a grid in background. The axis
> and grid appears in correct position, but the actual data are not there
>  Can somebody provide me a hint what is missing?
>
>  The code is:
>
> pln <- read.table(file="PLN.txt", header=TRUE, dec=",")
> par(mfrow=c(1,2))
> plot(pln[,1], type="l", lwd="2", ylab="EUR/PLN", xlab=NULL, xlim = c(1993,
> 2011), ylim = c(2, 5),  panel.first = grid(nx=NULL, ny=NULL))
> plot(log(pln[,1]), type="l", ylab="EUR/PLN", xlab=NULL, xlim = c(1993,
> 2011), panel.first = grid(equilogs = FALSE))
>
>  Cheers.
>  Sara
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph lines don;t appear

2011-03-15 Thread Philipp Pagel
On Tue, Mar 15, 2011 at 12:01:45PM +0100, Sara Szeremeta wrote:
> Hi
> 
>  I am trying to plot two simple graphs with a grid in background. The axis
> and grid appears in correct position, but the actual data are not there
>  Can somebody provide me a hint what is missing?
> 
>  The code is:
> 
> pln <- read.table(file="PLN.txt", header=TRUE, dec=",")
> par(mfrow=c(1,2))
> plot(pln[,1], type="l", lwd="2", ylab="EUR/PLN", xlab=NULL, xlim = c(1993,
> 2011), ylim = c(2, 5),  panel.first = grid(nx=NULL, ny=NULL))
> plot(log(pln[,1]), type="l", ylab="EUR/PLN", xlab=NULL, xlim = c(1993,
> 2011), panel.first = grid(equilogs = FALSE))

pln[,1] is just one column, so you are not plotting the values vs the
year but vs. their index. As xlim is set to the interval 1993-2011 you
simply don't see your data...

cu
Philipp

-- 
Dr. Philipp Pagel
Lehrstuhl für Genomorientierte Bioinformatik
Technische Universität München
Wissenschaftszentrum Weihenstephan
Maximus-von-Imhof-Forum 3
85354 Freising, Germany
http://webclu.bio.wzw.tum.de/~pagel/

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph in R with edge weights

2010-12-01 Thread Ivan Alves
Hi Arthur,

I was asking the same thing and came across the following (your need the "sna" 
library).

http://students.washington.edu/mclarkso/documents/gplot%20Ver2.pdf

Take a look at the edge.lwd and vertex.cex examples of the function gplot. You 
can use vectors for the different nodes.

Kind regards,
Ivan
On Dec 1, 2010, at 9:31 AM, arturs.onz...@gmail.com wrote:

> Can you please show code example, how to draw graph with some nodes and
> edges, but with weights. I only found here
> http://www.bioconductor.org/packages/release/bioc/vignettes/Rgraphviz/inst/doc/Rgraphviz.pdf-
> Using edge weights for labels, but...
> 
> Here an example:
> 
>> library("graph"); library(Rgraphviz)
>> myNodes = c("s", "p", "q", "r")
>> myEdges = list(
> s = list(edges = c("p", "q")),
> p = list(edges = c("p", "q")),
> q = list(edges = c("p", "r")),
> r = list(edges = c("s")))
>> g = new("graphNEL", nodes = myNodes,
> edgeL = myEdges, edgemode =
> "directed")
>> plot(g)
> 
> but how about weights?
> 
> 
> Thanx.
> 
>   [[alternative HTML version deleted]]
> 
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph margins

2010-09-29 Thread Jonathan Flowers
Use par(oma=c(1,1,1,1))  # oma = "outer margin area"

Is this what your looking for?

On Wed, Sep 29, 2010 at 5:03 PM, Mohsen Jafarikia wrote:

> Hello All,
>
> I am drawing a graph having 18 small graphs inside using par(mfrow =
> c(6,3))
> command. My problem is how to specify the margins of the whole 18 graphs. I
> used par(mar=c(6.5, 6.5, 1.5, 1.5)) for each graph separately already but
> it
> does not left any margins for the 'mtext()' for the margins of the whole 18
> graphs. Any comments please.
>
> Thanks,
> MJK
>
>[[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph help

2010-01-31 Thread Jim Lemon

On 01/31/2010 07:04 AM, Rob Manley wrote:

Hello,

I'm fairly new to R and having trouble displaying my data graphically to a
publishable quality.
I have a multivariate data-set (columns all the same length), 8
environmental variables and 3 species diversity variables.
I'm simply trying to display bivariate plots of the environmental variables
against the species diversity variables (response variables).
As there will be many graphs, I think it best to do it as par(mfrow =
c(3,4)) - twice over. The way I'm doing it at the moment looks a bit messy.
How do you reduce the space between graphs,


# this is a bit extreme
par(mar=c(0,0,0,0))

 delete the values that are

automatically put on the axes,


plot(...,xlab="",ylab="",axes=FALSE,...)

 and put text on the graph (e.g. R and p

values).


# someR and somep may be something like t.test(...)$p.value
Rp<-paste(paste("R =",someR),paste("p =",somep),sep="\n")
# x and y are where you want the text on the current plot
text(x,y,Rp)

Jim

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph help

2010-01-30 Thread Bryan Hanson
Robyn, I've found this page helpful in understand the details of the kinds
of plots you want to make:
http://research.stowers-institute.org/efg/R/Graphics/Basics/mar-oma/index.ht
m  but in general, if your subplots are related to each other, you should
probably switch from base graphics to the lattice or ggplot2 graphics
systems, which handle groups of data related by some categorical variable
much better.  Look at  http://had.co.nz/ggplot2/ for some ideas of what's
possible, or 
http://lmdvr.r-forge.r-project.org/figures/figures.html?chapter=01;figure=;t
heme=stdColor;code=right

Bryan
*
Bryan Hanson
Acting Chair
Professor of Chemistry & Biochemistry
DePauw University, Greencastle IN USA



On 1/30/10 3:04 PM, "Rob Manley"  wrote:

> Hello,
> 
> I'm fairly new to R and having trouble displaying my data graphically to a
> publishable quality.
> I have a multivariate data-set (columns all the same length), 8
> environmental variables and 3 species diversity variables.
> I'm simply trying to display bivariate plots of the environmental variables
> against the species diversity variables (response variables).
> As there will be many graphs, I think it best to do it as par(mfrow =
> c(3,4)) - twice over. The way I'm doing it at the moment looks a bit messy.
> How do you reduce the space between graphs, delete the values that are
> automatically put on the axes, and put text on the graph (e.g. R and p
> values).
> 
> I'd be very grateful for any help,
> 
> Many thanks,
> 
> Robyn
> 
> [[alternative HTML version deleted]]
> 
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph color

2010-01-26 Thread Kyle.
If I understand what you want correctly, you'll probably want to use the
"col" argument in whatever base graphics function you're using, rather than
changing something in the graphical parameters.  For example, if I wanted to
add red points to an existing plot, I would use something like

 points(c(1:10), col="red")

Or, if I wanted to generate a barplot using a shading color other than gray,

 barplot(c(1:10), col="steelblue")

Does that answer your question?


Kyle H. Ambert
Fellow, National Library of Medicine
Department of Medical Informatics & Clinical Epidemiology
Oregon Health & Science University



On Tue, Jan 26, 2010 at 6:44 AM, Jose Narillos de Santos <
narillosdesan...@gmail.com> wrote:

> Hi all I want to apply different colors on a simple plot:
>
> If I type par(br="gray") before a plot it puts all the image in gray but
> (imagine I run a simple plot) want to let the centrall box (where the dots
> are plotted) in white or image in lightblue.
>
> Can anyone guide me to apply this second step (make the box where the
> series
> are plotted in different colours).
>
> Thanks in advance.
>
>[[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph titles from massive

2010-01-07 Thread David Winsemius


On Jan 7, 2010, at 11:24 AM, Trafim Vanishek wrote:


Dear all,

I would like to ask you if there is a possibility in R to give the  
names to

graphs which are not const.
For example,

How to name each plot, or to add notes like a=x[i], b=y[i] in this  
cycle


x<-c(1,2,3,4,5,6)
y<-c(7,8,9,10,11,12)

par(mfrow=c(2,3))

for (i in 1:6){
plot(x,y)
}


This might be what you want:

> x<-c(1,2,3,4,5,6)
> y<-c(7,8,9,10,11,12)
>
> par(mfrow=c(2,3))
>
> for (i in 1:6){
+ plot(x,y, main=paste("this is plot # ", i, sep=""))
+ }
>

I initially thought you wanted the object names to be different for  
which this answer would not be responsive and no answer could be  
provided since that is not how base graphics work. For that you would  
need grid, lattice, or ggplot methods.



David Winsemius, MD
Heritage Laboratories
West Hartford, CT

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Graph titles from massive

2010-01-07 Thread jim holtman
use the 'main' parameter:

for (i in 1:6){
plot(x,y,main=paste("Plot:", i))
}

On Thu, Jan 7, 2010 at 11:24 AM, Trafim Vanishek wrote:

> Dear all,
>
> I would like to ask you if there is a possibility in R to give the names to
> graphs which are not const.
> For example,
>
> How to name each plot, or to add notes like a=x[i], b=y[i] in this cycle
>
> x<-c(1,2,3,4,5,6)
> y<-c(7,8,9,10,11,12)
>
> par(mfrow=c(2,3))
>
> for (i in 1:6){
> plot(x,y)
> }
>
>
> Thank you for your time and help!
>
>[[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graph shading is overlaying axes

2009-12-29 Thread Jim Lemon

On 12/28/2009 10:38 PM, Dean1 wrote:

How can I resolve this problem?...

As a general example,
plot (1:4)
polygon(c(0,0,5,5),c(0,5,5,0), border="lavenderblush1", col =
"lavenderblush1")
###see how this overlays the axes lines

#I have tried...
for (k in 1:4)  axis(k, lwd.ticks=0, label=F)
#...but this misses the corners
   

Hi Dean,
In addition to what Jim Holtman wrote, you can try the fullaxis function 
in the plotrix package.


Jim

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


  1   2   >