Sergio Silva 2 Posted September 29, 2020 Share Posted September 29, 2020 Hello, I've written a script that calls theAnomalize package to perform outlier detection on my data. #Let's check for anomalies oil_anomalies % as.tibble() %>% group_by(well_name) %>% mutate(Last_Day = last(Days)) %>% filter(Last_Day >= 366) %>% time_decompose(Monthly_Prod, method = "twitter", frequency = "3 months", trend = "2 months", merge = TRUE) %>% anomalize(remainder,method = "gesd", alpha = 0.25, max_anoms = 0.5) %>% time_recompose() The input consists of 3 columns, one is the identifier while the second is Datetime object and third are the values represented by those dates. Basically, I'm able to run this code succesfully in Rstudio. However, when transfering over to the TERR engine in Spotfire I keep getting the erro below. TIBCO Enterprise Runtime for R returned an error (7) The data function 'Ordered Data (Ordered Data )' could not be executed. Error: Problem with `mutate()` input `nested.col`. 'stl' is not an exported object from 'namespace:stats' Input `nested.col` is `purrr::map(.x = data, .f = .f, target = Monthly_Prod, ...)`. eval(script, envir = .GlobalEnv) eval(script, envir = .GlobalEnv) withCallingHandlers({ ordered_data %>% as.tibble() %>% group_by(well_name) %>% mutate(Last_Day = last(Days)) %>% filter(Last_Day >= 366) %>% time_decompose(Monthly_Prod, withVisible(eval(quote(`_fseq`(`_lhs`)), env, env)) eval(quote(`_fseq`(`_lhs`)), env, env) eval(quote(`_fseq`(`_lhs`)), env, env) `_fseq`(`_lhs`) freduce(value, `_function_list`) function_list[](value) time_decompose(., Monthly_Prod, method = "twitter", frequency = "3 months", time_decompose.grouped_df(., Monthly_Prod, method = "twitter", time_decompose(data = data, target = !(!dplyr::enquo(target)), time_decompose.grouped_tbl_time(data = data, target = !(!dplyr::enquo(target)), data %>% grouped_mapper(.f = time_decompos Any ideas Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now