dmirman / gazer

Functions for reading and pre-processing eye tracking data.
43 stars 11 forks source link

Error when running dplyr::gather #21

Closed Naylasokhn closed 2 years ago

Naylasokhn commented 2 years ago

Dear all,

I am trying to run the Gazer_walkthrough.R script, i am getting an error when running the following part

gaze_obj <-gaze_aoi %>% dplyr::gather(key ="object", value ="fix",Targ, Comp, Unrelated, factor_key =TRUE) %>% dplyr::mutate(Fix =replace_na(fix, FALSE)) # recode NA as not- Error: 'gather' is not an exported object from 'namespace:dplyr'

Any help is much appreciated Thanks in advance! Best regards, Nayla

jgeller112 commented 2 years ago

Hi @Naylasokhn,

Thanks for reporting this! Indeed gather is not part of the dplyr library, it is a tidyr function.You change the dplyr:: part to tidyr::. Another issue is that gather function is being depreciated. I will update that to use pivot_longer in the future.

Jason

Naylasokhn commented 2 years ago

Dear Jason,

Thanks a lot! this works fine now :D Best, Nayla