Unexpected symbol when concatenate strings in R

42 Views Asked by At

I met the following problem. My dataset "Sales" store as disk.frame. There are two character variables "Item-Entity" and "SBLOC". I want to create another variable concatenated these variables:

Sales <- as.disk.frame(Sales) %>%
  mutate("Item-Loc" = paste(as.character(`Item-Entity`), as.character(SBLOC), sep = '--'))

Instead of result I got the error message

Error in parse(text = sprintf("chunk_fn(.disk.frame.chunk, %s)", args_str)) : 
  <text>:1:37: unexpected '='
1: chunk_fn(.disk.frame.chunk, Item-Loc=
                                        ^

If I store my dataset as data.frame everything work good. Moreover, another mutate commands with arithmetic calculations under the data work good as well.

Please advise

0

There are 0 best solutions below