I'm having problems using unnest_tokens on a particular dataset.
I've tried using non-standard evaluation, i.e. unnest_tokens_, to pull the column from the dataframe. However this feature is now deprecated.
I've subset the singular column I want to work with, transformed to a tibble and have added a column name.
unnestedSymptoms <- TidySymptoms %>%
unnest_tokens(word, Text)
However this is throwing the following error:
Error in UseMethod("pull") : no applicable method for 'pull' applied to an object of class "character">
As I'm not directly calling pull() I don't know where to go from here. Any help appreciated
Output from Subset Dataframe, one column:
structure(c("Slight fever the day of the injections. The next night he Stopped breathing in the middle of the night twice. Temperature was 96 degrees Fahrenheit when arriving at the emergency room.", "Slight fever the day of the injections. The next night he Stopped breathing in the middle of the night twice. Temperature was 96 degrees Fahrenheit when arriving at the emergency room.", "Slight fever the day of the injections. The next night he Stopped breathing in the middle of the night twice. Temperature was 96 degrees Fahrenheit when arriving at the emergency room.", "Slight fever the day of the injections. The next night he Stopped breathing in the middle of the night twice. Temperature was 96 degrees Fahrenheit when arriving at the emergency room.", "Slight fever the day of the injections. The next night he Stopped breathing in the middle of the night twice. Temperature was 96 degrees Fahrenheit when arriving at the emergency room.", "Slight fever the day of the injections. The next night he Stopped breathing in the middle of the night twice. Temperature was 96 degrees Fahrenheit when arriving at the emergency room.", "Slight fever the day of the injections. The next night he Stopped breathing in the middle of the night twice. Temperature was 96 degrees Fahrenheit when arriving at the emergency room.", "Slight fever the day of the injections. The next night he Stopped breathing in the middle of the night twice. Temperature was 96 degrees Fahrenheit when arriving at the emergency room.", "Abnormal eye movements (multiple an hour) the following day (12/19). He was taken to local emergency room and admitted to neurology for continuous video EEG, sedated for brain MRI, ophthalmology exam. All tests were normal, but movements have continued. He saw ophthalmology for a dilated exam today, 1/6/2020, and they referred us to neuro ophthalmology.", "Pt showed at the ER on 12/25/2020 after falling mid walk. Pt left hand was rhythmically opening and closing. Head was twitching and left arm and left leg twitching-sx lasted 10min. Fever of 103 documented by EMS, vaccines 1 wk prior to the ER visit. Sx resolved 2 hrs after seizure. Diagnosed with ? atypical febrile seizure. Patient then sent to Center where he had an EEG and neurology consult. Dx with complex febrile seizure- had felt possible febrile seizure vs epilepsy vs genetic predisposition secondary to TMPRSS3 genetic mutation.", "Pt showed at the ER on 12/25/2020 after falling mid walk. Pt left hand was rhythmically opening and closing. Head was twitching and left arm and left leg twitching-sx lasted 10min. Fever of 103 documented by EMS, vaccines 1 wk prior to the ER visit. Sx resolved 2 hrs after seizure. Diagnosed with ? atypical febrile seizure. Patient then sent to Center where he had an EEG and neurology consult. Dx with complex febrile seizure- had felt possible febrile seizure vs epilepsy vs genetic predisposition secondary to TMPRSS3 genetic mutation.", "Pt showed at the ER on 12/25/2020 after falling mid walk. Pt left hand was rhythmically opening and closing. Head was twitching and left arm and left leg twitching-sx lasted 10min. Fever of 103 documented by EMS, vaccines 1 wk prior to the ER visit. Sx resolved 2 hrs after seizure. Diagnosed with ? atypical febrile seizure. Patient then sent to Center where he had an EEG and neurology consult. Dx with complex febrile seizure- had felt possible febrile seizure vs epilepsy vs genetic predisposition secondary to TMPRSS3 genetic mutation.", "Pt showed at the ER on 12/25/2020 after falling mid walk. Pt left hand was rhythmically opening and closing. Head was twitching and left arm and left leg twitching-sx lasted 10min. Fever of 103 documented by EMS, vaccines 1 wk prior to the ER visit. Sx resolved 2 hrs after seizure. Diagnosed with ? atypical febrile seizure. Patient then sent to Center where he had an EEG and neurology consult. Dx with complex febrile seizure- had felt possible febrile seizure vs epilepsy vs genetic predisposition secondary to TMPRSS3 genetic mutation.", "Pt showed at the ER on 12/25/2020 after falling mid walk. Pt left hand was rhythmically opening and closing. Head was twitching and left arm and left leg twitching-sx lasted 10min. Fever of 103 documented by EMS, vaccines 1 wk prior to the ER visit. Sx resolved 2 hrs after seizure. Diagnosed with ? atypical febrile seizure. Patient then sent to Center where he had an EEG and neurology consult. Dx with complex febrile seizure- had felt possible febrile seizure vs epilepsy vs genetic predisposition secondary to TMPRSS3 genetic mutation.", "Pt showed at the ER on 12/25/2020 after falling mid walk. Pt left hand was rhythmically opening and closing. Head was twitching and left arm and left leg twitching-sx lasted 10min. Fever of 103 documented by EMS, vaccines 1 wk prior to the ER visit. Sx resolved 2 hrs after seizure. Diagnosed with ? atypical febrile seizure. Patient then sent to Center where he had an EEG and neurology consult. Dx with complex febrile seizure- had felt possible febrile seizure vs epilepsy vs genetic predisposition secondary to TMPRSS3 genetic mutation.", "Pt showed at the ER on 12/25/2020 after falling mid walk. Pt left hand was rhythmically opening and closing. Head was twitching and left arm and left leg twitching-sx lasted 10min. Fever of 103 documented by EMS, vaccines 1 wk prior to the ER visit. Sx resolved 2 hrs after seizure. Diagnosed with ? atypical febrile seizure. Patient then sent to Center where he had an EEG and neurology consult. Dx with complex febrile seizure- had felt possible febrile seizure vs epilepsy vs genetic predisposition secondary to TMPRSS3 genetic mutation.", "Pt showed at the ER on 12/25/2020 after falling mid walk. Pt left hand was rhythmically opening and closing. Head was twitching and left arm and left leg twitching-sx lasted 10min. Fever of 103 documented by EMS, vaccines 1 wk prior to the ER visit. Sx resolved 2 hrs after seizure. Diagnosed with ? atypical febrile seizure. Patient then sent to Center where he had an EEG and neurology consult. Dx with complex febrile seizure- had felt possible febrile seizure vs epilepsy vs genetic predisposition secondary to TMPRSS3 genetic mutation.", "Throat closing, palpitation, lightheadedness, cough with bronchospasm" ), .Names = c("Text", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA))
# Remove NA
AllData21NAGONE <- na.omit(AllData21)
AllData21NAGONE_tbl <- AllData21NAGONE %>% as_tibble(AllData21NAGONE)
# Subset Col to work with
TidySymptoms <- AllData21NAGONE_tbl$SYMPTOM_TEXT
# Add column names
names(TidySymptoms) <- c("Text")