简体   繁体   中英

How to import audio into R on a mac?

I have recently changed from a PC to a mac, and have trouble trying to input my recorded audio into R.

On the PC the audio needed to be in 'My Documents' for the tuneR package to find my audio using:

readWave('audio.wav')

However I am having trouble finding the right directory that the audio needs to be on the mac for R to find it.

So far I have my audio file copied into every folder, but still no luck.

The audio can be in whatever directory you like, you just have to tell R exactly where it is. Try writing out the full path to the file, eg readWave('/Users/EmmaL/audiofiles/audio.wav') . To find out the path, look up the file in Finder, right click, select Get Info , and check out General -> Where:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM