When I try to output a world file of R Markdown, I got an error message:
Quitting from lines 63-119 (Untitled.Rmd)
Error in nchar(x) > n :
comparison (6) is possible only for atomic and list types
Calls: ... sew.list -> lapply -> FUN -> sew.character ->
Execution halted
And I also get an error message like "Error while opening file", "No such file or directory", but the file path is definitely right.
The chunk( lines 63-119) works well, when I run it independently. I have no idea what's wrong in my code and how to fix it.
Here's my code.
```{r import data}
#r import data
behaviour = read.csv("/Users/lu/Documents/Quatium Project/Task 1/Task 1 Data/QVI_purchase_behaviour.csv")
transaction = read_excel("/Users/lu/Documents/Quatium Project/Task 1/Task 1 Data/QVI_transaction_data.xlsx")
```
1.1 Examine transaction data
```{r Task 1.1 Examine transaction data}
# show the summary of transaction data metrix
head(transaction)
#--------# Change the type of DATE into date format #--------
transaction$DATE <- as.Date(transaction$DATE, origin = "1899-12-30")
str(transaction)
```