Skip to content
Prev 78941 / 398502 Next

problems with loop and plot function

Hi

you forgot to plot something before adding points (and actually 
you wanted lines).

plot(conc, log10(1-choixg), main ="fonction de choix", col= n,
pch=20,
lwd = 3,
xlab = " concentration", ylab="proba de choisir la gauche", type="n")

for( n in c(1,3,5)) {
 x <- NULL; y <- NULL
 simResult <- simulation (5,n)
 conc <- simResult$conc
 choixg <- simResult$choixg
 print("n");  print(c(k=5, n)) ### what is this???
 lines(conc, log10(1-choixg))
}

Isn't it time to read some introductory texts?
:-)


HTH
Petr
On 13 Oct 2005 at 12:47, KOITA Lassana - STAC/ACE wrote:
To:             	R-help at stat.math.ethz.ch
From:           	"KOITA Lassana - STAC/ACE" <lassana.koita at aviation-civile.gouv.fr>
Date sent:      	Thu, 13 Oct 2005 12:47:27 +0200
Subject:        	[R] problems with loop and plot function
Petr Pikal
petr.pikal at precheza.cz