This is my first question on SO
I loaded a CSV file into R Notebook using
train -> fread("name.csv")
Used head(train)
which displayed first 6 rows.
Everything was working fine.
Then i tried converting the data type of Date column from default char to Date using train[, Date := as.Date(Date)]
.
Data type got converted to Date but my R Notebook stopped displaying results for commands like head(train)
, train[1:2]
...it just did not display first 6 rows, nothing at all.
The problem started after putting this command train[, Date := as.Date(Date)]
. So I removed it and rechecked if my R Notebook was displaying results for head(train)
etc. It worked, R Notebook was back to displaying results.
I used R console to check if it was a unique issue with notebook. Turns out that it is. Everything worked fine in traditional R console.
I was not sure what would be the right title for this question. How to get it work?
Update: Putting [ ] at the end of
train[, Date := as.Date(Date)]
does not work