search for: choixg

Displaying 3 results from an estimated 3 matches for "choixg".

2005 Oct 13
1
problems with loop and plot function
Hi all R users, I have problems with my second loop for drawing the three curves in the same graphic. I need help please Thank you in advance ######################################################################### simulation <- function(k, n){ conc <- seq(0,100,by=0.5) #choixg <- seq(1, length(conc)) choixg <- rep(0,length(conc)) for (i in 1:length(conc)){ choixg[i] <- (k + conc[i])^n/((k+conc[i])^n + (k+1)^n) } #return(data.frame(choixg, conc)) return(list(choixg=choixg, conc = conc)) } #cbind(simResult$conc, simResult$choixg, format(Sys.time(),&...
2005 Oct 11
2
Problems with plot function
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 = " conc...
2005 Oct 12
0
loop for plot function
...ll four or five figures in the same graphic (n= 1, 2, ..., 4 ou 5) I have tested one, but unsuccessfully. I need you to solve this problems Thank you ###########################################################################" simulation <- function(k, n){ conc <- seq(0,100,by=0.5) #choixg <- seq(1, length(conc)) choixg <- rep(0,length(conc)) for (i in 1:length(conc)){ choixg[i] <- (k + conc[i])^n/((k+conc[i])^n + (k+1)^n) } #return(data.frame(choixg, conc)) return(list(choixg=choixg, conc = conc)) } #choixg <- simulation(5,2) #mydf<-simulation(5,1) si...