title: R is not recognizing the value of a variable
body: <p>I am working with the website <a href="http://www.crowdrise.com/CDISkoll" rel="nofollow">http://www.crowdrise.com/CDISkoll</a></p>
  
  <p>consider the following R code that I made:</p>
  
  <pre><code>library("RCurl")
  library("XML")
  library("stringr")
  
  user.address&lt;-"http://www.crowdrise.com/CDISkoll"                     
  user.url&lt;-getURL(user.address)       
  html &lt;- htmlTreeParse(user.url, useInternalNodes = TRUE)
  
  if(!is.null(xpathSApply(html,
     '//div[@class="grid1-4"]//p[@class="progressText"]',xmlValue))){
         website.goal.percentage&lt;-
                 do.call("paste",as.list(xpathSApply(html,
                  '//div[@class="grid1-4"]//p[@class="progressText"]',xmlValue)))
  } 
  
  if(is.null(xpathSApply(html,
    '//div[@class="grid1-4"]//p[@class="progressText"]',xmlValue))){
            website.goal.percentage&lt;-"Not Available"
  }
  </code></pre>
  
  <p>now the website I mentioned above does not contain any information pertaining to the xpath 
  <code>//div[@class="grid1-4"]//p[@class="progressText"]</code>. Thus my variable <code>website.goal.percentage</code> should be the character string <code>"Not Available"</code> . But when I perform the codes on R, it <code>website.goal.percentage</code>  returns <code>character(0)</code>....</p>
  
  <p>Why is R not storing <code>"Not Available"</code> to the variable <code>website.goal.percentage</code>, and how can I fix this?</p>