Answers.Body: <p>I would recommend using seewave. Something like this should be good:</p>
  <pre><code># install packages if needed
  install(seewave, tuneR)
  
  # activate packages
  library(seewave)
  library(tuneR)
  
  # read the .wav file
  wav_file &lt;- readWave(file_path)
  
  # plot spectrum for section 2-6 secs in wav file
  spectro(wav_file, tlim=c(2,6))
  </code></pre>
  <p>You can see more on other potential parameters here:
  <a href="https://rdrr.io/cran/seewave/man/spectro.html" rel="noreferrer">https://rdrr.io/cran/seewave/man/spectro.html</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-12-13T19:17:22.743Z
Answers.LastActivityDate: 2022-12-13T19:17:22.743Z
Answers.UserDisplayName: Carlos Abrahams
Body: <p>I have a a wave file and I need to make a spectrogram in R. I also need to be able to look at a specific time of the whole recording in the spectrogram. Anybody knows how to?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-12-10T19:54:17.367Z
Comments.Text: Sorry, as far as I see the R documentation has multiple examples on how to create spectrograms, but is there something missing in your question that goes beyond the examples on the web?
Comments.UserDisplayName: WMXZ
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-12-10T19:59:50.533Z
Comments.Text: For example https://hansenjohnson.org/post/spectrograms-in-r/
Comments.UserDisplayName: WMXZ
Tags: <r><code><spectrogram>
Title: How to make a spectrogram in R
ThreadText: # How to make a spectrogram in R
  
  (Asked by: username_0 on 2022-12-10)
  
  I have a a wave file and I need to make a spectrogram in R. I also need to be able to look at a specific time of the whole recording in the spectrogram. Anybody knows how to?
  
  **Tags:** r, code, spectrogram
  
  > **Comments:**
  > **username_1**: Sorry, as far as I see the R documentation has multiple examples on how to create spectrograms, but is there something missing in your question that goes beyond the examples on the web?  
  > **username_1**: For example https://hansenjohnson.org/post/spectrograms-in-r/  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2022-12-13. Score: 11
  
  I would recommend using seewave. Something like this should be good:
  # install packages if needed
  install(seewave, tuneR)
  
  # activate packages
  library(seewave)
  library(tuneR)
  
  # read the .wav file
  wav_file <- readWave(file_path)
  
  # plot spectrum for section 2-6 secs in wav file
  spectro(wav_file, tlim=c(2,6))
  
  You can see more on other potential parameters here:
  https://rdrr.io/cran/seewave/man/spectro.html
  
  
  ---
  
  