Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

translate a line from Python to R language

Dear forum,

after some failed attempts to create a functioning interface for using Python in R, I hope there is a simpler solution for my problem. I'm not exactly familiar with Python.

I need to apply a formula written in Python so that it works in R:

blinkreconstruct(series, vt=5, maxdur=500, margin=10, smooth_winlen=21, std_thr=3)

Can this formula be easily changed accordingly?

Hopefully my info is useful. I don't know how much work this would be, maybe someone can tell me.

Thank you very much!


Here is some more info on the formula:

It's from here.

It's meant to do a cubic interpolation for pupillometry data, a blink reconstruction.

series refers to a column of pupil size data, apparently severy values per cell.

vt is a pupil velocity treshold, thus will be defined by me.

maxdur refers to a number of milliseconds, thus defined by me.

margin refers to the margin to take around a blink.

smooth_winlen and std_thr I don't know.

Comments

Sign In or Register to comment.