title: R plot spectrogram base on the amplitude data of a wave
body: <p>In R, if I would like to plot the spectrogram from a wave, it is as following:</p>
  
  <pre><code>&gt;library(sound)
  &gt;library(tuneR)
  &gt;library(seewave)
  &gt;s1&lt;-readWave('sample1.wav')
  &gt;spectro(s1,main='s1')
  &gt;str(s1)
   Formal class 'Wave' [package "tuneR"] with 6 slots
    ..@ left     : int [1:312000] 2293 2196 1964 1640 1461 1285 996 600 138 -195 ...
    ..@ right    : num(0) 
    ..@ stereo   : logi FALSE
    ..@ samp.rate: int 8000
    ..@ bit      : int 16
    ..@ pcm      : logi TRUE
  </code></pre>
  
  <p>But what if I just have data.txt as </p>
  
  <pre><code>2293 2196 1964 1640 1461 1285 996 600 138 -195 ...
  </code></pre>
  
  <p>What should I put in the <code>spectro</code> function? <code>spectro(wave, f, ...)</code>, <code>wave</code> is said to be <code>an R object</code>. Or I should use others to get the plot? I tried </p>
  
  <pre><code>&gt;s_1&lt;-read.table("s_1.txt", sep=" ")
  &gt;spectro(s_1,f=8000)
  Error in filled.contour.modif2(x = X, y = Y, z = Z, levels = collevels,  :
  no proper 'z' matrix specified
  </code></pre>
  
  <p>and ended with error. Thank you.</p>