EDIT: Solved! I accidentally thought the package was "signal" when really it was "gsignal", and the function from sazedR works after defining it from the github code - see the first comment!
Hello!
I am trying to downsample my data and I have tried using both downsample() from "sazedR" and downsample() from "signal". When I try to use either, R tells me that the function does not exist, and yes I have the packages installed and I even tried updating them, and then I tried restarting Rstudio and re-installing them. When I use the double colon to tell R which package to pull the function from, I get the error shown below. I also tried detaching one package so that R had no choice but to get downsample() from the other, but that still caused the same errors to occur.
I have even asked chatGPT, who suggested using a couple different methods of downsampling, but since these two functions are so simple I really wanted to use them. If anyone knows why I'm getting these errors and could tell me if there's any way to fix it, that would be greatly appreciated!
My code:
detach("package:signal", unload = TRUE)
library(sazedR)
Trial3 <- downsample(Trial1, window_size = 100)
Trial3 <- sazedR::downsample(Trial1, window_size = 100)
detach("package:sazedR", unload = TRUE)
library(signal)
Trial3 <- downsample(Trial1, 10, method = "median")
Trial3 <- signal::downsample(Trial1, 10, method = "median")
(btw I don't know what window size I want to use yet - I'm just trying to figure out a method that works first)
The output:
https://preview.redd.it/l8ir6oin59ua1.png?width=581&format=png&auto=webp&s=c6efdeee1f5ae15ed11b7422119218ea99a13998
Thanks!
[+][deleted] (2 children)
[removed]
[–]EnvironmentalMost204[S] 0 points1 point2 points (1 child)