title: R numeric variable, non null, non na but empty
body: <h2>Hi eveyrone ##.</h2>
  
  <p>I got some problem with R that I can't fix: Currently i'm working with GEOquery package and I want to retrieve some informations in metadata of gse files.</p>
  
  <p>More precisely I'm looking for the channel label (for exemple Cye3). Here's a sample of my code :</p>
  
  <pre><code>&gt;library(GEOquery)
  &gt;gse&lt;-getGEO("GSE2253",GSEMatrix=TRUE,destdir=".")
  &gt;gse&lt;-gse[[1]]
  &gt;gse$label_ch1[1]
   V2 
  
  Levels:  According to Affymetrix protocol (biotin)`
  </code></pre>
  
  <p>And here's my problem</p>
  
  <pre><code>`&gt; is.na(gse$label_ch1[1])
    V2 
   FALSE 
  &gt; is.null(gse$label_ch1[1])
  [1] FALSE`
  </code></pre>
  
  <p>This GSE file is a text file and in the line corresponding to the label (!Sample_label_ch1) there is no value.So, here's what I'v done for my work:</p>
  
  <pre><code>`if(is.na(gse$label_ch1[1])){
  color&lt;-"Non specified"
  } else {
  label&lt;-gse$label_ch1[1]
  }`
  </code></pre>
  
  <p>So, if I got no informations for the channel I just say "non specified", else, I return the value. But I'v got error with this if/else statement in my script:</p>
  
  <p><code>Error in if (file == "") file &lt;- stdout() else if (is.character(file)) { : 
    the length of argument is null</code></p>
  
  <p>Sorry if the error traduction is not exact, my R version is in French ^^.</p>
  
  <p>I tried </p>
  
  <pre><code>if(as.character(gse$label_ch1[1])=="")
  </code></pre>
  
  <p>But it doesn't work either</p>
  
  <p>If someone has an idea to help me ^^</p>
  
  <p>Thanks in advance!</p>
  
  <p>Script:</p>
  
  <pre><code>sample&lt;-NULL
  output&lt;-NULL
  gse&lt;-NULL
  color&lt;-NULL
  
  
  series_matrix&lt;-dir(getwd(),pattern="*series_matrix.txt")
  series_matrix&lt;-unlist(strsplit(series_matrix,"_")[1])
  for(i in 1:length(series_matrix)){
  
  gse&lt;-getGEO(series_matrix[i],GSEMatrix=TRUE,destdir=".")
  gse&lt;-gse[[1]]
  
  if(length(gse$label_ch1[1])==0){
   color&lt;-"Non specified"
   } else {
   color&lt;-gse$label_ch1[1]
   }
   print (color)
  
  
  sample&lt;-cbind(as.character(gse$title),as.character(gse$geo_accession))
  outputsample&lt;-paste(getwd(),"/sample.txt",sep="")
  write.table(paste("txt",color,sep=""),output,
  row.names=FALSE,col.names=FALSE,sep="\t",quote=FALSE)
  write.table(sample,outputsample,
  row.names=FALSE,col.names=FALSE,sep="\t",quote=FALSE,append=TRUE)
  
  
  Feature_Num&lt;-list(1:length(featureNames(gse)))
  Gene_Symbol&lt;-pData(featureData(gse)[,11])
  Probe_Name&lt;-pData(featureData(gse)[,1])
  Control_Type&lt;-pData(featureData(gse)[,3])
  liste&lt;-as.character(sampleNames(gse))
  for(i in 1:lenght(liste)){
   values&lt;-cbind(Feature_Num,Gene_Symbol,Probe_name,Control_Type,exprs(gse)[,i])
   colnames(values)&lt;-c("Feature_Num","Gene_Symbol",
   "Probe_Name","Control_Type","gMedianSignal")
   write.table(values,paste(getwd(),"/Ech",liste[i],".txt",sep=""),
   row.names=FALSE,quote=FALSE,sep="\t")
   }
  }
  </code></pre>
  
  <p>Don't hesitate if you want explication about lines in this script</p>