[R] Problems with plot function

From: KOITA Lassana - STAC/ACE <lassana.koita_at_aviation-civile.gouv.fr>
Date: Wed 12 Oct 2005 - 02:54:18 EST

Hello all R users,
My simulation function works correctly, but I have problems with plot function. You will find the following code using it. Thank you for your help
##################################################"

simulation <- function(k, n){

conc <- seq(0,10,by=0.5)
#choixg <- seq(1, length(conc))
choixg <- rep(0,length(conc))
for (i in 1:length(conc)){

    choixg[i] <- (k + conc[i])^2/((k+conc[i])^n + (k+1)^n)

    }
   return(choixg)

}
simulation(5,1)

plot(conc, choixg, main ="fonction de choix", col= "blue", pch=20, xlab = " concentration", ylab="proba de choisir la gauche")
##########################################################

Lassana KOITA
Service Technique de l'Aviation Civile (STAC) Direction Générale de l'Aviation Civile (DGAC) Tel: 01 49 56 80 60
Fax: 01 49 56 82 14
http://www.stac.aviation-civile.gouv.fr



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Oct 12 03:21:19 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:41 EST