I checked in the previous issues, but did not find this question asked before.
The minimum reprex is below
Description
Thank you for this tutorial. I am at the document 4-files.Rmd where we add the churn_cor target in _target file. After adding the target, I ran tar_make() at line 116, but it throws the following error:
Error: callr subprocess failed: Can't rename columns that don't exist. x Columnrownamedoesn't exist.
Reproducible example
I checked the relevant functions.R file. The function compute_cor() is defined at line 279. I tried to reproduce the example above the function:
> library(corrr)
> library(keras)
> library(recipes)
> library(rsample)
> library(tidyverse)
> library(yardstick)
> churn_data <- split_data("data/churn.csv")
> churn_recipe <- prepare_recipe(churn_data)
> compute_cor(churn_recipe)
Error: Can't rename columns that don't exist.
x Column `rowname` doesn't exist.
Run `rlang::last_error()` to see where the error occurred.
Prework
Description
Thank you for this tutorial. I am at the document
4-files.Rmd
where we add thechurn_cor
target in_target
file. After adding the target, I rantar_make()
at line 116, but it throws the following error:Error: callr subprocess failed: Can't rename columns that don't exist. x Column
rownamedoesn't exist.
Reproducible example
I checked the relevant
functions.R
file. The functioncompute_cor()
is defined at line 279. I tried to reproduce the example above the function:The function definition is as follows:
So, I ran the code line by line, outside of the function:
I think the error occurs because
rename
function has an undefined column namerowname
.Expected result
compute_cor
should create a tibble of correlations. If I putterm
inside therename
function, it works:Diagnostic information