tests/readWaveTest.R

library("tuneR")
d <- list.files("Testfiles", pattern="\\.wav$")
garbage <- lapply(d, 
    function(x) {
        wav <- readWave(file.path("Testfiles", x))
        cat(x, "\n")
        print(wav)
        if(is(wav, "Wave")){
            print(wav@left[1:10])
            if(wav@stereo)
                print(wav@right[1:10])
        } else {
            print(wav@.Data[1:10,])
        }
    }
)

Try the tuneR package in your browser

Any scripts or data that you put into this service are public.

tuneR documentation built on May 2, 2019, 6:15 p.m.