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:
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 REPR oducible EX ample (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:
A minimal reproducible example consists of the following items:
A minimal dataset, necessary to reproduce the issue
The minimal runnable code necessary to reproduce the issue, which can be run
on the given dataset, and including the necessary information on the used packages.
Let's quickly go over each one of these with examples:
Minimal Dataset (Sample Data)
You need to provide a data frame that is small enough to be (reasonably) pasted on a post, but big enough to reproduce your issue.
Let's say, as an example, that you are working with the iris data frame
head(iris)
#> Sepal.Length Sepal.Width Petal.Length Petal.Width Species
#> 1 5.1 3.5 1.4 0.…
Alright thanks!
I will give the FAQ a read, thanks once again!
system
Closed
September 25, 2019, 2:31am
6
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.