Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R package #61

Open
romainmartinez opened this issue Oct 27, 2016 · 18 comments
Open

R package #61

romainmartinez opened this issue Oct 27, 2016 · 18 comments

Comments

@romainmartinez
Copy link

romainmartinez commented Oct 27, 2016

Hi,

Is is expected to make a spm1d package on R?

@0todd0000
Copy link
Owner

Hi Romain,

We don't have plans at the moment to develop a package for R, but we'd be pleased to consider it if there is enough interest.

Please ask anyone interested in running spm1d in R to add a comment here so we can gauge the level of interest.

Cheers,

Todd

@benjidutaillis
Copy link

Hi Todd,

I would 100% use the package in R if developed.

Cheers,
Benji

@0todd0000
Copy link
Owner

Thank you for the feedback.

Total current number of votes: 2 (as of 2018-04-05)

@thomas-neitmann
Copy link

thomas-neitmann commented Oct 17, 2018

I just wanted to point out that one can easily use the spm1d module from within R thanks to the reticulate package (this requires a python version to be installed on your computer).
An example session in R might look something like this:

library(reticulate)
spm1d = import("spm1d")
dataset = spm1d$data$uv1d$tpaired$PlantarArchAngle()
data = dataset$get_data()
t = spm1d$stats$ttest_paired(data[[1]], data[[2]])
ti = t$inference()
ti
SPM{T} inference field
   SPM.z         :  (1x101) raw test stat field
   SPM.df        :  (1, 9)
   SPM.fwhm      :  20.37196
   SPM.resels    :  (1, 4.90871)
Inference:
   SPM.alpha     :  0.050
   SPM.zstar     :  3.93947
   SPM.h0reject  :  True
   SPM.p_set     :  0.037
   SPM.p_cluster :  (0.037)

Other than replacing the . by $ there is not really much difference. Unfortunatly the plotting does not seam to work. Yet, one can relatively easily write a custom plot function in R.

@Jessica-gh
Copy link

I see that I'm a little late to the conversation, but I would also love to have an R package for this. I struggle with Matlab and I've been playing around with Python with similar results, but for some reason I'm pretty comfortable in R.

Re: reticulate-Thanks for the suggestion TommyN94.
I've tried to access the spm1d package through Canopy as suggested here: http://www.spm1d.org/install/InstallationPython.html#label-installationpython

I also tried the reticulate function in R and in both cases I receive errors that the package doesn't exist. I have installed Python 3.7, Canopy 2.0, R 1.0.153; I realize that these versions are different than what's suggested so I don't know if that's my issue or something else is going on. I'd appreciate any advice and I appreciate your patience with my novice programming skills.

@0todd0000
Copy link
Owner

Thank you for the R feedback, and sorry for the Python errors!

Another way to install spm1d for Python is to download it then run the setup.py script as follows:

  • Download and unzip the source code:
    http://www.spm1d.org/Downloads.html

  • Open a Terminal (macos, Linux) or a Command Prompt (Windows)

  • Navigate to the unzipped directory, for example:

cd /Users/username/Downloads/spm1d-master/
  • Run the setup script:
python setup.py install

Then the next time you launch Python you should be able to access spm1d using:

>>>  import spm1d

@Jessica-gh

This comment has been minimized.

@0todd0000

This comment has been minimized.

@vlittle19
Copy link

I would also like to have a spm1d package in R.

@SKATElin215
Copy link

I'm interested in an R package as well!

@Vh2m
Copy link

Vh2m commented Nov 20, 2019

Hi Todd,
I would love to have an r Package too!.
Tks

@GrantDornan
Copy link

I would love to have the spm1d package available in R!

@0todd0000
Copy link
Owner

Quick tabulation of R requests to-date:
From 2016 to present (2021-03-16): 7 requests
From 2020 to present (2021-03-16): 0 requests

These aren't big numbers, so for now an R-specific package will remain a future possibility pending further interest.

If you are an R user and are looking to use spm1d, please refer to @thomas-neitmann's comment above re: accessing Python functionality in R via the reticulate package.

@jhmigueles
Copy link

One extra vote to the R package (a bit late I'm afraid).
I can help with the development if needed

@angelobj
Copy link

Another vote!

@EricDugan
Copy link

another vote for R package

@SHughes93
Copy link

Another vote for R, but can use the python system adequately enough so not a strong need.

@ar0berts
Copy link

ar0berts commented Jul 6, 2023

These votes keep coming!! R Studio provides a really comfortable environment for analysing gait and other biomechanical data (for me anyway) and the plethora of graphical options for results presentation adds to the attraction. I'm far less comfortable in Python but if no R package emerges I will need get to grips with it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests