title: pasting Jpeg output in directory in R
body: <p>I have function which performs scatter plot and I want to paste the results(Jpeg images) in D:/output but instead it is pasting in D:/.I want my results to be pasted on D:/output.
  Please do help me.</p>
  
  <pre><code>setwd("D:/output") 
  IDs &lt;- colnames(raw.expression) 
  for (i in 1:(dim(raw.expression)[2]-1)) 
    { for( j in i:(dim(raw.expression)[2]) ) 
      { if (i != j) 
        { jpeg(file=paste("/",IDs[i],"gegen",IDs[j],".jpg",sep="")) 
          correlation &lt;- round(cor(raw.expression[,i],raw.expression[,j]),2)
          maximum &lt;- max(log2(raw.expression[,i])) 
          minimum &lt;- min(log2(raw.expression[,i]))  
          plot(log2(raw.expression[,i]),log2(raw.expression[,j])
            ,xlab=IDs[i],ylab=IDs[j],p‌​ch='.'
            ,text (maximum-2,minimum+0.5
            ,labels=paste("R = ",correlation,sep=""),pos=4,offset=0)) 
          dev.off() 
        } 
      } 
    }
  </code></pre>