I've tried the solution here but it seems to be specifically for macOS.
> sonify(x = 1:5)
sh: 1: /tmp/RtmptMxwTo/tuneRtemp.wav: Permission denied
I can see something quickly appear then disappear in the temporary folder:
/tmp/RtmptMxwTo
This code from the tuneR documentation works fine:
x <- seq(0, 2*pi, length = 44100)
channel <- round(32000 * sin(440 * x))
WMCobj <- WaveMC(data = channel)
Wobj <- sine(440)
tdir <- tempdir()
tfile <- file.path(tdir, "myWave.wav")
writeWave(Wobj, filename = tfile)
list.files(tdir, pattern = "\\.wav$")
newWobj <- readWave(tfile)
newWobj
play(newWobj)
file.remove(tfile)
I'm on Ubuntu 18.04 and R version 3.6.3. I installed sonify and it's dependencies today.