Predicting Sunspot Frequency with Keras

Hi everyone,

I am new to the RStudio Community. Recently, I have tried using the codes for 'Predicting Sunspot Frequency with Keras' by Matt Dancho and Sigrid Keydana and I bumped into an issue.

Whenever I try to run the line:

coln <- colnames(compare_train)[4:ncol(compare_train)]
cols <- map(coln, quo(sym(.)))

RStudio will show the error:

Error in is_symbol(x) : object '.' not found

Did anyone face this issue as well? Could it be due to the updates on the packages involved?

The complete script can be found here:
Predicting Sunspot Frequency with Keras

Thank you! Any help would be much appreciated!

Just add the formula symbol ~

cols <- map(coln, ~quo(sym(.)))

Hi andresrcs,

Thanks for replying!

After adding the symbol ~, I ran into another issue:

image

So I tried adding eval_tidy to the sixth line of the rsme_train code but another issue arose:

rsme_train <-
  map_dbl(cols, function(col)
    rmse(
      compare_train,
      truth = value,
      estimate = eval_tidy(!!col),
      na.rm = TRUE
    )) %>% mean()

Error: Result 1 is not a length 1 atomic vector

Is it possible that map_dbl shouldn't be used here?

Thank you!

If you need more specific help, please provide a minimal REPRoducible EXample (reprex). A reprex makes it much easier for others to understand your issue and figure out how to help.

If you've never heard of a reprex before, you might want to start by reading this FAQ:

Alright thanks!

I will give the FAQ a read, thanks once again!