title: Creating a QQ plot in R
body: <p>I have been trying to create a qq plot in R. I struggled using my results so I have tried to follow the example from "Basic statistical analysis in genetic case-control studies, Clarke et al.) </p>
  
  <p>Step 5, a, iii) I have replaced the path to's and models with the required field and appears as follows:</p>
  
  <pre><code>data&lt;-read.table("C:\Users\X\Desktop\BIOM3006\Alternate/data.assoc.logistic",header=TRUE);pdf("C:\Users\X\Desktop\BIOM3006\Alternate/pvalue.qq.plot.pdf");
  
  obs&lt;-−log10(sort(data[data$TEST=="ADD",]$P));exp&lt;-−log10(c(1:length(obs))/(length(obs)+ 1));plot(exp, 
  
  obs&lt;-ylab="Observed(−logP)",xlab="Expected(−logP)",ylim=c(0,20),xlim=c(0,7)) lines(c(0,7),c(0,7),col=1,lwd=2);dev.off()
  </code></pre>
  
  <p>This is the error message that I'm getting:</p>
  
  <pre><code>data&lt;-read.table("C:\Users\Tom\Desktop\BIOM3006\Alternate/data.assoc.logistic",header=TRUE);pdf("C:\Users\Tom\Desktop\BIOM3006\Alternate/pvalue.qq.plot.pdf");
  Error: '\U' used without hex digits in character string starting ""C:\U"
  
  obs&lt;-−log10(sort(data[data$TEST=="ADD",]$P));exp&lt;-−log10(c(1:length(obs))/(length(obs)+ 1));plot(exp, 
  Error in log10(sort(data[data$TEST == "ADD", ]$P)) : 
   non-numeric argument to mathematical function
  
  In addition: Warning message:
  In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
  
  obs&lt;-ylab="Observed(−logP)",xlab="Expected(−logP)",ylim=c(0,20),xlim=c(0,7))
  Error: unexpected ',' in "obs&lt;-ylab="Observed(-logP)","
  
  lines(c(0,7),c(0,7),col=1,lwd=2)
  Error in plot.xy(xy.coords(x, y), type = type, ...) : 
  plot.new has not been called yet
  
  ;dev.off()
  Error: unexpected ';' in ";"
  </code></pre>
  
  <p>I'm still getting to grips with this software so any help would be appreciated and sorry if I have overlooked something glaringly obvious. 
  Tom</p>