craddm / eegUtils

An R package for processing and plotting of electroencephalography (EEG) data
https://craddm.github.io/eegUtils
Other
101 stars 26 forks source link

Missing geom_head and circ_rad_fun #64

Closed andrillon closed 4 years ago

andrillon commented 4 years ago

Hello,

Great repository, thanks! I am trying to use it to plot EEG scalp topographies but the topoplot.R function crashes because the following functions are missing: geom_head and circ_rad_fun. If I comment the corresponding lines, the function runs and produce a plot (without the head contour though). I could not find the two above-mentioned functions on the git repo.

Thanks, Thomas

craddm commented 4 years ago

Hi Thomas,

Can you give me a little more information? I can't replicate your problem - the function works fine here. For a start, what is the data you are trying to plot? Is it a data frame or one of the various classes of eeg_* data?

Cheers, Matt

andrillon commented 4 years ago

Hi Matt,

Thanks for the quick answer. The data I try to plot is a data frame. To make it work, I commented the line 784-785 as well as 302-303 of topoplot.R

These lines called circ_rad_fun and geom_head resp. I could find the help for circ_rad_fun in the git (man>circ_rad_fun.Rd) but not the actual function.

Thanks again for your help, Thomas

On 28 May 2020, at 11:48 pm, Matt Craddock notifications@github.com wrote:

Hi Thomas,

Can you give me a little more information? I can't replicate your problem - the function works fine here. For a start, what is the data you are trying to plot? Is it a data frame or one of the various classes of eeg_* data?

Cheers, Matt

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/craddm/eegUtils/issues/64#issuecomment-635361447, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHTKKPKXPSJOV3S546MQZRTRTZTTXANCNFSM4NMAV2FA.

craddm commented 4 years ago

I still can't replicate this, which might be because I have the development version installed at the moment. you could try using that instead -

remotes::install_github("craddm/eegUtils@develop")

Or if you've some example data you'd be ok to share (either here or through email) I can try then...

andrillon commented 4 years ago

Hi,

I tired the development version but I have the same error:

topoplot(aggdata_topo) Using electrode locations from data. Error in circ_rad_fun() : could not find function "circ_rad_fun"

  1. data.frame(x = r 1.03 cos(circ_rad_fun()), y = r 1.03 sin(circ_rad_fun())) at topoplot.R#784
  2. round_topo(out_df, r = plot_rad, interp_limit = interp_limit) at topoplot.R#266
  3. topoplot.data.frame(aggdata_topo) at topoplot.R#26
  4. topoplot(aggdata_topo)

Here is the data I was trying to plot:

Thanks, Thomas

On 29 May 2020, at 12:10 am, Matt Craddock notifications@github.com wrote:

I still can't replicate this, which might be because I have the development version installed at the moment. you could try using that instead -

remotes::install_github("craddm/eegUtils@develop")

Or if you've some example data you'd be ok to share (either here or through email) I can try then...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/craddm/eegUtils/issues/64#issuecomment-635373903, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHTKKPJ7ZOQ6G57LU6AJ4N3RTZWETANCNFSM4NMAV2FA.

craddm commented 4 years ago

Hi Thomas,

No data there; but I'm curious about something. This error shouldn't be happening if you're loading the package using library(eegUtils). That you've had some success commenting out some lines suggests to me that this isn't actually what you are doing. Are you accessing individual scripts and running those, or did you clone the repo or something?

Matt