Skip to content

Fails to rename: object 'X02.relief.ascii' not found #1

Open
@asifm

Description

@asifm

Hi, I'm not sure if I'm missing something simple, but the index.Rmd file is failing at line 250–255. I'm running it within a freshly downloaded repo. R version is 3.5.3 (64-bit) but I'm on Windows, not Linux -- I don't know if that has anything to do with this error. Please find the traceback below as well.

Code that fails

# read in raster of relief
relief <- raster("input/02-relief-ascii.asc") %>%
  # hide relief outside of Switzerland by masking with country borders
  mask(country_geo) %>%
  as("SpatialPixelsDataFrame") %>%
  as.data.frame() %>%
  rename(value = `X02.relief.ascii`)

Traceback

Error in .f(.x[[i]], ...) : object 'X02.relief.ascii' not found
15. .f(.x[[i]], ...)
14. map(.x[sel], .f, ...)
13. map_if(quos, is_symbol, eval_tidy, data)
12. vars_rename_eval(quos, .vars)
11. tidyselect::vars_rename(names(.data), !!!quos(...))
10. rename.data.frame(., value = X02.relief.ascii)
9. rename(., value = X02.relief.ascii)
8. function_list[[k]](value)
7. withVisible(function_list[[k]](value))
6. freduce(value, `_function_list`)
5. `_fseq`(`_lhs`)
4. eval(quote(`_fseq`(`_lhs`)), env, env)
3. eval(quote(`_fseq`(`_lhs`)), env, env)
2. withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
1. raster("input/02-relief-ascii.asc") %>% mask(country_geo) %>% as("SpatialPixelsDataFrame") %>% as.data.frame() %>% rename(value = X02.relief.ascii)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions