79161443

Date: 2024-11-06 05:49:12
Score: 1
Natty:
Report link

If I use the first table "my_df", it will run "forever"

# pkgs
library(dplyr)
library(wqtrends)

# data from the question
my_df <- data.frame(
  station = c(50900149, 50900149, 50900149, 50900149, 50900149, 50900149),
  param = rep("chl", 6),
  value = c(1.4, 0.5, 1, 2, 2.1, 2.9),
  cont_yr = c(2024, 2024, 2024, 2024, 2024, 2024)
)

# filter to mimic the question
pdmod <- my_df %>%
  filter(station %in% 50900149) %>%
  filter(param %in% "chl")

# define knots (kts) = 5 to avoid getting stuck
pdgam <- anlz_gam(pdmod, trans = 'log10', kts = 5)
summary(pdgam)

could you please send a minimal example that is easy to follow? you can follow from my example

I am curious why most columns are constant in the first table, but in the 2nd the year has decimal values

Reasons:
  • RegEx Blacklisted phrase (2.5): could you please send
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • High reputation (-1):
Posted by: pachadotdev