title: How to erase spaces in paste function to build URL?
body: <p>In advance, thank you for your help.  Essentially, I am scripting a program that builds a URL which will provide a CSV file.  The program asks the user for several inputs and then appends those inputs to the base URL. The problem I am getting is that there is an added space between each of the user inputs when I try to paste them together in the URL.  The problem is in the #Build URL line.</p>
  
  <p>Here is the code</p>
  
  <pre><code> #URL Builder for Yahoo Finance
   #Requests Input from User, Builds URL, downloads csv.file from site
   #Requests are for:
        #Ticker (2-4 letter - character string)
        #Start Month (00 - 11 integer)
        #Start Day (1 - 31 integer)
        #Start Year (Four digit integer)
        #End Month (00 - 11 integer)
        #End Day (1 - 31 integer)
        #End Year (Four digit integer)
  
   #Functions
        Get_Ticker &lt;- function(){readline("Please enter a Ticker:&gt;&gt;&gt; ")} 
        Get_Month_Begin &lt;- function(){as.numeric(readline("Enter the start month (MM):&gt;&gt;&gt; "))}
        Get_Day_Begin &lt;- function(){as.numeric(readline("Enter the start day (1-31) :&gt;&gt;&gt; "))}
        Get_Year_Begin &lt;- function(){as.numeric(readline("Enter the start year (YYYY) :&gt;&gt;&gt; "))}
        Get_Month_End &lt;- function(){as.numeric(readline("Enter the end month (MM) :&gt;&gt;&gt; "))}
        Get_Day_End &lt;- function(){as.numeric(readline("Enter the end day (1-31) :&gt;&gt;&gt; "))}
        Get_Year_End &lt;- function(){as.numeric(readline("Enter the end year :&gt;&gt;&gt; "))}
  
   #Function Calls
        Ticker &lt;- Get_Ticker()
        Month_Begin &lt;- Get_Month_Begin()
        Day_Begin &lt;- Get_Day_Begin()
        Year_Begin &lt;- Get_Year_Begin()
        Month_End &lt;- Get_Month_End()
        Day_End &lt;- Get_Day_End()
        Year_End &lt;- Get_Year_End()
  
   #Build URL
   #Example URL: ichart.finance.yahoo.com/table.csv?s=DVN&amp;a=00&amp;b=1&amp;c=1992&amp;d=11&amp;e=31&amp;f=2013&amp;g=d&amp;ignore=.csv
        CSV_Base_URL &lt;- "ichart.finance.yahoo.com/table.csv?s="
        CSV_URL_Complete &lt;- paste(CSV_Base_URL,Ticker,"&amp;a=",Month_Begin,"&amp;b=",Day_Begin,"&amp;c=",Year_Begin,"&amp;d=",Month_End,"&amp;e=",Day_End,"&amp;f=",Year_End,"&amp;g=d&amp;ignore=.csv",sep="")
  
   #Download CSV
        Yahoo_Finance_TBL &lt;- read.csv(CSV_URL_Complete)
  
   #Write CSV File
        write.csv(Yahoo_Finance_TBL, file="Yahoo_Finance_File", row.names=FALSE)
  </code></pre>
  
  <p>Again, I am very grateful for your assistance.</p>
  
  <p>Respectfully,</p>
  
  <p>Jonathan</p>