search for: n_male

Displaying 2 results from an estimated 2 matches for "n_male".

Did you mean: male
2011 Feb 27
3
accessing variables inside a function, inside a loop
...quot;,header=T) source("functions.R") attach(water) names(water): [1] "site" "sample" "temp" "pH" "DO" "BOD" [7] "COD" "no3" "no2" "po4" "N_male" "N_female" vars<-names(water)[3:10] par(mfrow=c(4,2)) for (i in vars) { comp.plot(i,N_male,DATA=water) } comp.plot<-function(parameter,y,DATA){ #this is actually in functions.R x<-DATA[[parameter]] y<-DATA[[y]] plot(y~parameter) } and of course,...
2011 Mar 07
4
png inside loop
...X/fem",i,".png",sep="") mname<-paste("Henni/GFX/mal",i,".png",sep="") png(fname,1000,1000) xyplot(N_female~eval(parse(text=i)) |group,xlab=i,ylab="Abundance") graphics.off() png(mname,1000,1000) xyplot(N_male~eval(parse(text=i)) |group,xlab=i,ylab="Abundance") graphics.off() } well, to anyone's surprise, there are no plots in the folder. the loop finishes (i, fname and mname have values assigned) and executing png(fname,1000,1000) xyplot(N_female~eval(parse(text=i)) |group,xlab=i,y...