Re: [R] error type

2012-08-26 Thread David L Carlson
Look at your plot command. You included type=o twice. 

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


 -Original Message-
 From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
 project.org] On Behalf Of aprendiz programa
 Sent: Sunday, August 26, 2012 4:02 PM
 To: r-help@r-project.org
 Subject: [R] error type
 
 
 Hi,
 I am trying plot a grafic but generates an error:
 Erro em plot.default(xlim, ylim, type = n, ann = FALSE, axes = FALSE,
 :   argumento formal type corresponde a mzltiplos argumentos
 especificados
 DATA:
 44 40 39 38  0  7  7  1030 57 37 5146 40 41 4737 34 36 2636 28 33 3738
 26 28 2742 38 36 3636 27 22 2853 43 33 40
 plot(dados[1],type=o,pch=21,
 axes=FALSE,xlab=year,ylab=cases)lines(dados[2], type=o,
 pch=22)lines(dados[3], type=o,pch=23)lines(dados[4],
 type=o,pch=24)legend(1,8.5,
 legend=c(Pel,RG,SM,SV),pch=21:24)axis(1,at=1:10,
 lab=c(2000,2001,2002,2003,2004,2005,2006,2007,2008,2
 009))axis(2,0:60)
   [[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] error type

2012-08-26 Thread aprendiz programa

but represents another line of script


 From: dcarl...@tamu.edu
 To: aprendizprog...@hotmail.com; r-help@r-project.org
 Subject: RE: [R] error type
 Date: Sun, 26 Aug 2012 16:12:50 -0500
 
 Look at your plot command. You included type=o twice. 
 
 --
 David L Carlson
 Associate Professor of Anthropology
 Texas AM University
 College Station, TX 77843-4352
 
 
  -Original Message-
  From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
  project.org] On Behalf Of aprendiz programa
  Sent: Sunday, August 26, 2012 4:02 PM
  To: r-help@r-project.org
  Subject: [R] error type
  
  
  Hi,
  I am trying plot a grafic but generates an error:
  Erro em plot.default(xlim, ylim, type = n, ann = FALSE, axes = FALSE,
  :   argumento formal type corresponde a mzltiplos argumentos
  especificados
  DATA:
  44 40 39 38  0  7  7  1030 57 37 5146 40 41 4737 34 36 2636 28 33 3738
  26 28 2742 38 36 3636 27 22 2853 43 33 40
  plot(dados[1],type=o,pch=21,
  axes=FALSE,xlab=year,ylab=cases)lines(dados[2], type=o,
  pch=22)lines(dados[3], type=o,pch=23)lines(dados[4],
  type=o,pch=24)legend(1,8.5,
  legend=c(Pel,RG,SM,SV),pch=21:24)axis(1,at=1:10,
  lab=c(2000,2001,2002,2003,2004,2005,2006,2007,2008,2
  009))axis(2,0:60)
  [[alternative HTML version deleted]]
 
 
  
[[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] error type

2012-08-26 Thread David Winsemius


On Aug 26, 2012, at 2:16 PM, aprendiz programa wrote:



but represents another line of script


If you post in HTML which fails to properly represent your code you  
should not be expecting us to deparse it correctly in our heads.



plot(dados[1],type=o,pch=21,
axes=FALSE,xlab=year,ylab=cases)

-Missing cr^


lines(dados[2], type=o,
pch=22)

Missing cr^


lines(dados[3], type=o,pch=23)lines(dados[4],
type=o,pch=24)


Another missing cr


legend(1,8.5,
legend=c(Pel,RG,SM,SV),pch=21:24)axis(1,at=1:10,
lab 
=c(2000,2001,2002,2003,2004,2005,2006,2007,2008,2

009))


Yet another missing CR


axis(2,0:60)




From: dcarl...@tamu.edu
To: aprendizprog...@hotmail.com; r-help@r-project.org
Subject: RE: [R] error type
Date: Sun, 26 Aug 2012 16:12:50 -0500

Look at your plot command. You included type=o twice.

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



-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of aprendiz programa
Sent: Sunday, August 26, 2012 4:02 PM
To: r-help@r-project.org
Subject: [R] error type


Hi,
I am trying plot a grafic but generates an error:
Erro em plot.default(xlim, ylim, type = n, ann = FALSE, axes =  
FALSE,

:   argumento formal type corresponde a mzltiplos argumentos
especificados
DATA:
44 40 39 38  0  7  7  1030 57 37 5146 40 41 4737 34 36 2636 28 33  
3738

26 28 2742 38 36 3636 27 22 2853 43 33 40
plot(dados[1],type=o,pch=21,
axes=FALSE,xlab=year,ylab=cases)lines(dados[2], type=o,
pch=22)lines(dados[3], type=o,pch=23)lines(dados[4],
type=o,pch=24)legend(1,8.5,
legend=c(Pel,RG,SM,SV),pch=21:24)axis(1,at=1:10,
lab 
=c(2000,2001,2002,2003,2004,2005,2006,2007,2008,2

009))axis(2,0:60)
[[alternative HTML version deleted]]





[[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.


David Winsemius, MD
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] error type

2012-08-26 Thread aprendiz programa



From: aprendizprog...@hotmail.com
To: r-help@r-project.org
Date: Mon, 27 Aug 2012 00:01:52 +0300
Subject: [R] error type

 
Hi,
I am trying plot a grafic but generates an error:
Erro em plot.default(xlim, ylim, type = n, ann = FALSE, axes = FALSE,  :   
argumento formal type corresponde a múltiplos argumentos especificado
plot(dados[1],type=o,pch=21, 
axes=FALSE,xlab=year,ylab=cases)lines(dados[2], type=o, 
pch=22)lines(dados[3], type=o,pch=23)lines(dados[4], 
type=o,pch=24)legend(1,8.5, 
legend=c(Pel,RG,SM,SV),pch=21:24)axis(1,at=1:10, 
lab=c(2000,2001,2002,2003,2004,2005,2006,2007,2008,2009))axis(2,0:60)
  
[[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] error type

2012-08-26 Thread Jeff Newmiller
As the footer says...

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

Some issues with your email are:

a) You posted in HTML, which in spite of appearances does NOT appear on our 
screens the same as on your screen. Configure your mail to be sent in plain 
text.

b) Reproducible code means we can paste it into our R interpreter and get the 
same result you did. You did not give us the code that read your data into the 
dados object, or data in an R-understandable way. Read 
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example

I doubt you should be referring to dados[1], dados[2] and similar... plot 
and lines functions accept a whole vector of data at once. Also, the  bits 
sprinkled in don't look like valid syntax, but I can't tell if that is due to 
HTML corruption or whether you actually typed that in.
---
Jeff NewmillerThe .   .  Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#.   ##.#.  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.

aprendiz programa aprendizprog...@hotmail.com wrote:




From: aprendizprog...@hotmail.com
To: r-help@r-project.org
Date: Mon, 27 Aug 2012 00:01:52 +0300
Subject: [R] error type

 
Hi,
I am trying plot a grafic but generates an error:
Erro em plot.default(xlim, ylim, type = n, ann = FALSE, axes = FALSE,
:   argumento formal type corresponde a m�ltiplos argumentos
especificado
plot(dados[1],type=o,pch=21,
axes=FALSE,xlab=year,ylab=cases)lines(dados[2], type=o,
pch=22)lines(dados[3], type=o,pch=23)lines(dados[4],
type=o,pch=24)legend(1,8.5,
legend=c(Pel,RG,SM,SV),pch=21:24)axis(1,at=1:10,
lab=c(2000,2001,2002,2003,2004,2005,2006,2007,2008,2009))axis(2,0:60)
 
   [[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] error type

2012-08-26 Thread David L Carlson
You are still using html - you need to tell hotmail to use plain text only.

I can't replicate your error with the following:

dados - c(44, 40, 39, 38, 0, 7, 7, 1030, 57, 37, 5146, 40, 41, 4737, 34,
36, 
  2636, 28, 33, 3738, 26, 28, 2742, 38, 36, 3636, 27, 22, 2853, 43, 33, 40)

plot(dados[1],type=o,pch=21,axes=FALSE,xlab=year,ylab=cases)
lines(dados[2], type=o, pch=22)
lines(dados[3], type=o,pch=23)
lines(dados[4], type=o,pch=24)
legend(1,8.5, legend=c(Pel,RG,SM,SV),pch=21:24)
axis(1,at=1:10,lab=c(2000,2001,2002,2003,2004,2005,2006,
 2007,2008,2009))
axis(2,0:60)

But I'm sure the result is not what you are looking for since you are using
lines() to plot a single symbol (points() is normally used for this). You
have 32 values in dados (or 40 if the 4-digit values should really be two
2-digit values). You are trying to plot 10 years on the x axis and you
specify a range for the y-axis of 0 to 60, but the range in values is much
greater. Use dput(dados) and paste that into your email and tell us what the
plot should look like. 

As a wild guess let's say you really want

dados - matrix(c(44, 40, 39, 38, 0, 7, 7, 10, 30, 57, 37, 51, 46, 40, 41,
47,
 37, 34, 36, 26, 36, 28, 33, 37, 38, 26, 28, 27, 42, 38, 36, 36, 36, 27,
 22, 28, 53, 43, 33, 40), ncol=4)
group - c(rep(Pel, 10), rep(RG, 10), rep(SM, 10), rep(SV, 10))
year - 2000:2009
matplot(year, dados, col=1, pch=21:24)
legend(bottomleft, legend=c(Pel,RG,SM,SV), pch=21:24)

Is this closer to what you are looking for?

---
David

 -Original Message-
 From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
 project.org] On Behalf Of aprendiz programa
 Sent: Sunday, August 26, 2012 4:42 PM
 To: r-help@r-project.org
 Subject: Re: [R] error type
 
 
 
 
 From: aprendizprog...@hotmail.com
 To: r-help@r-project.org
 Date: Mon, 27 Aug 2012 00:01:52 +0300
 Subject: [R] error type
 
 
 Hi,
 I am trying plot a grafic but generates an error:
 Erro em plot.default(xlim, ylim, type = n, ann = FALSE, axes = FALSE,
 :   argumento formal type corresponde a mzltiplos argumentos
 especificado
 plot(dados[1],type=o,pch=21,
 axes=FALSE,xlab=year,ylab=cases)lines(dados[2], type=o,
 pch=22)lines(dados[3], type=o,pch=23)lines(dados[4],
 type=o,pch=24)legend(1,8.5,
 legend=c(Pel,RG,SM,SV),pch=21:24)axis(1,at=1:10,
 lab=c(2000,2001,2002,2003,2004,2005,2006,2007,2008,2
 009))axis(2,0:60)
   [[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.