We have a big database with 1189 records and 330 variables in a mySQL file that was exported to a CSV comma delimited file. I am using read_csv from readr to import the database that apparently it is imported fine. However, when I try to recode some of the vars I get the error:
Error: unexpected symbol in "test.data$coder<-test.data$User Name"
library(readr)
test.data<-read_csv("test_hcsv_file.csv", col_names = TRUE, show_col_types=FALSE)
str(test.data)
spc_tbl_ [1,109 × 363] (S3: spec_tbl_df/tbl_df/tbl/data.frame)
$ FormId : num [1:1109] 17 18 19 20 21 198 113 25 26 27 ...
$ UserId : num [1:1109] 67 67 64 67 67 71 71 71 67 67 ...
$ User Name
[1:1109] "user1" "user2" "user3" "user4" ...
test.data$coder<-test.data$User Name
> test.data$coder<-test.data$User Name
Error: unexpected symbol in "test.data$coder<-test.data$User Name"