title: Set up and running function for multiple observations and variables
body: <p>I have a question about the setup and execution of a function to some multivariate data.</p>
  
  <p>My data file is set up in excel with each variable as individual sheets, and each trajectory as a row of data (100 trajectories in total). The values within each row across 365 columns show the measurements associated with the respective variable across time (daily measurements over 1 year).</p>
  
  <p>I’ve done some analysis of 1 trajectory by setting up my data manually in a separate excel file, where I’ve got 16 columns containing separate variables, and 365 rows containing the associated data from each daily measurement. I’ve imported this into R as ‘Traj1’ and set up the function as follows;</p>
  
  <pre><code>&gt; T1 &lt;- Traj1[,1:16]
  &gt; multi.fun &lt;- function(T1) {c(summary(T1),sd(T1), skewness(T1), kurtosis(T1), shapiro.test(T1))}
  </code></pre>
  
  <p>However, I need to do this with 100 trajectories, and this is extremely inefficient (both in R and Excel time). </p>
  
  <p>I’m not sure how best to set this up in R with my initial excel file set up, and how this function should be set up so that I can batch execute and export the output into a new excel file.</p>
  
  <p>Sorry I am new to programming in general and haven’t had much experience in dealing with large data sets. Any help is really appreciated.</p>