I open a csv file and change one column from char to 'date'
Then click Import and it works fine. However, if I try to put this in a script to avoid changing to date every time I open this, the code preview I use does not work.
The error is this:
Error: unexpected '=' in:
"SampleImport <- read_csv("LoadingData/data/SampleImport.csv",
+ col_types ="
I try to make sense of the Help file, but I don't recognize my error there.
In addition to providing the error message, you should also provide the code you ran that produced this error. This will help when trying to diagnose the issue.
If you are using RStudio, I recommend copying and pasting previously run commands from the History pane, rather than from the Console. This will avoid any + from sneaking into your code.