> files <- dir(data_dir, recursive = TRUE, full.names = TRUE, pattern = "[.]wav$")
> BAT_wav <- read_audio(file.path(wd, "data/c_pip/c_pip_247.wav"))
> BAT_wav
Wave Object
Number of Samples: 954211
Duration (seconds): 2.48
Samplingrate (Hertz): 384000
Channels (Mono/Stereo): Mono
PCM (integer format): TRUE
Bit (8/16/24/32/64): 16
> files <- dir(data_dir, recursive = TRUE, full.names = TRUE, pattern = "[.]wav$")
> # Keep the extracted feature and merge in a single data frame for further analysis
> # You can use object[["element"]] instead of object$element.
> Event_data_01 <- do.call("rbind", c(lapply(TDs, function(x) x$data$event_data), list(stringsAsFactors = FALSE)))
> nrow(Event_data_01)
[1] 1
>
> # Compute the number of extracted c_pip calls
> sum(startsWith(Event_data_01$filename, "c_pip"))
Error in Event_data_01$filename :
$ operator is invalid for atomic vectors
>
Works OK in Windows 10, but not Ubuntu 18. Any ideas?
BAT_wav <- read_audio(file.path(wd, "data/c_pip/c_pip_247.wav")) BAT_wav files <- dir(data_dir, recursive = TRUE, full.names = TRUE, pattern = "[.]wav$")
Keep the extracted feature and merge in a single data frame for further analysis
You can use object[["element"]] instead of object$element.
Event_data_01 <- do.call("rbind", c(lapply(TDs, function(x) x$data$event_data), list(stringsAsFactors = FALSE))) nrow(Event_data_01)
Compute the number of extracted c_pip calls
sum(startsWith(Event_data_01$filename, "c_pip"))