dmirman / gazer

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

unable to install saccades and edfR #17

Closed NatKar2021 closed 3 years ago

NatKar2021 commented 3 years ago

Hi,

I am unable to install packages saccades and edfR. The message I receive is:

"Error: (converted from warning) package 'zoom' was built under R version 4.0.4 Execution halted ERROR: lazy loading failed for package 'saccades'

Maybe you have seen this before? Any help is very appreciated.

jgeller112 commented 3 years ago

Please see this post: https://github.com/dmirman/gazer/issues/3

What OS are you using? did you try:

`` library("remotes") install_github("tmalsburg/saccades/saccades", dependencies=TRUE)

NatKar2021 commented 3 years ago

Dear Dan, Thanks for your prompt answer. I use Windows 10. I tried to use dependencies=TRUE and the issue persist. From the post #3 it seems that the best option is to move the analyses to the CO or to export data directly from data viewer and process it using the the gazeR manuscript that doesn’t rely on edfR. It looks like this version does not use "saccades". I will try these solutions and will let you know how it worked.

NatKar2021 commented 3 years ago

Hi again! I tried to run the analyses in CO, but get the wrong message (similar to the one in #3): Error: Can't subset columns that don't exist. x The column blink doesn't exist. Run rlang::last_error() to see where the error occurred.

When I run rlang::last_eroor()

rlang::last_error() <error/vctrs_error_subscript_oob> Can't subset columns that don't exist. x The column blink doesn't exist. Backtrace:

  1. gazer::parse_edf(file.choose(), output_dir = output_dir)
  2. vctrs:::stop_subscript_oob(...)
  3. vctrs:::stop_subscript(...) Run rlang::last_trace() to see the full context.

How should I proceed? I do not have mac (I saw that the user in #3 switched to mac after this error). Thanks in advance for your help!

jgeller112 commented 3 years ago

Can you please provide me with file you are using?

NatKar2021 commented 3 years ago

Yes. It is here https://drive.google.com/file/d/1O8zZy8iSBh1fCRNGQLARnqVX9SjGAZGz/view?usp=sharing thanks in advance.

jgeller112 commented 3 years ago

Huh...I cannot download the file. It says it is in owner's trash. Can you send it to me another way? Perhaps through email?

NatKar2021 commented 3 years ago

Oh, I am sorry, I accidentally removed the folder. Here is a link again, it should work now https://drive.google.com/file/d/1O8zZy8iSBh1fCRNGQLARnqVX9SjGAZGz/view?usp=sharing

jgeller112 commented 3 years ago

I had no problems running your EDF file through the Code Ocean GazeR container (https://drive.google.com/file/d/1EgMm7nmLQDyPOiM9z8ugLX8dgpCX4Vn-/view?usp=sharing). Did you watch the video I posted showing how to read in files through Code Ocean?

To better diagnose the problem, can you please copy and paste the code you used in the Code Ocean container?

Jason

NatKar2021 commented 3 years ago

Hi. Thank you so much for trying. I did follow the video. Here is the code that I used in the CO container:

library(data.table) library(tidyverse) library(zoo) library(here)

devtools::load_all()

library(gazer)

get the whereabouts

here()

define output path

output_dir = '/root/capsule/code'

parse edf

gazer::parse_edf(file.choose(), output_dir = output_dir)

After that I select the file, I receive the above-reported error. Shall I try with csv files, directly reported from Data Viewer, in R?

jgeller112 commented 3 years ago

I think getting files from Data Viewer will be the easiest solution.

On Apr 3, 2021, at 4:06 PM, NatKar2021 @.***> wrote:



Hi. Thank you so much for trying. I did follow the video. Here is the code that I used in the CO container:

library(data.table) library(tidyverse) library(zoo) library(here)

devtools::load_all()

library(gazer)

get the whereabouts

here()

define output path

output_dir = '/root/capsule/code'

parse edf

gazer::parse_edf(file.choose(), output_dir = output_dir)

After that I select the file, I receive the above-reported error. Shall I try with csv files, directly reported from Data Viewer, in R?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/dmirman/gazer/issues/17#issuecomment-812918753, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEMTQECOM7TQUEWO2CI5XB3TG5YKRANCNFSM42ATUBBQ.

jgeller112 commented 3 years ago

You need to set the working directory to where the EDF file is.

As a side note, what kind of paradigm is this data from?

Get Outlook for iOShttps://aka.ms/o0ukef


From: NatKar2021 @.> Sent: Saturday, April 3, 2021 4:06:00 PM To: dmirman/gazer @.> Cc: Geller, Jason @.>; Comment @.> Subject: [External] Re: [dmirman/gazer] unable to install saccades and edfR (#17)

Hi. Thank you so much for trying. I did follow the video. Here is the code that I used in the CO container:

library(data.table) library(tidyverse) library(zoo) library(here)

devtools::load_all()

library(gazer)

get the whereabouts

here()

define output path

output_dir = '/root/capsule/code'

parse edf

gazer::parse_edf(file.choose(), output_dir = output_dir)

After that I select the file, I receive the above-reported error. Shall I try with csv files, directly reported from Data Viewer, in R?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/dmirman/gazer/issues/17#issuecomment-812918753, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEMTQECOM7TQUEWO2CI5XB3TG5YKRANCNFSM42ATUBBQ.

NatKar2021 commented 3 years ago

Thank you for your help. Unfortunately, setting the working directory to where the EDF file is did not work. The paradigm is Looking while Listening, used in infant research to examine preference for different audio stimuli. I will try to work with an csv file in R then. Best and thanks again for your assistance! Best.

jgeller112 commented 3 years ago

Following these exact steps in Code Ocean should work.

library(tidyverse)
library(data.table)
library(tidyverse)
library(zoo)
library(here)

devtools::load_all()

setwd("~/capsule/data") # your data should be placed in data. 
edf.directory= "~/capsule/data" # path to data
csv.directory=here() # path where new files should be stored
file_list <- list.files (path=edf.directory, pattern=".edf") # extract the edfs from path
parse_edf(file_list, output_dir=csv.directory, type="vwp") # the default is pupil and you do not want that
jgeller112 commented 3 years ago

If you have access to Data Viewer, reading the csv files into gazeR is preferred.

Here is an early paper draft showing you how to use gazeR with the csv files: https://psyarxiv.com/gvcxb/

NatKar2021 commented 3 years ago

Hi Jason,

I am sorry for my radio silence. Thank you so much for this solution in Code Ocean. It did work this time!! Next time I will try with the csv files directly.

Thanks again for all your help!