title: Functions without arguments
body: <p>I'm not sure about this. Here is an example of a function which does not work:</p>
  
  <pre><code>myfunction&lt;-function(){
  mydata=read_excel("Square_data.xlsx", sheet = "Data", skip=0)
  mydata$Dates=as.Date(mydata$Dates, format= "%Y-%m-%d")
  mydata.ts=ts(mydata, start=2006, frequency=1)
  }
  </code></pre>
  
  <p>The files do not load. When I execute each command line by line in R the files are loaded, so there's no problem with the commands. My question is, can I run a function such as myfunction to load the files? Thanks.</p>