Giter VIP home page Giter VIP logo

neuropsychology.r's Introduction

neuropsychology

An R Toolbox for Psychologists, Neuropsychologists and Neuroscientists

Name neuropsychology
Status
Stable Version
Latest Version
Documentation Rdoc
Downloads
Authors

Installation

  • To get the stable version (0.2.4) From CRAN, run the following commands in your R console:
install.packages("neuropsychology")
library("neuropsychology")
  • To get the latest development version (0.3.0), run the following:
install.packages("devtools")
library("devtools")
install_github("neuropsychology/neuropsychology.R")
library("neuropsychology")

If it doesn't work, try updating R.


Feature Examples

Use a data set

df <- personality

Available datasets are:

  • personality

See the description of each dataset by typing ?nameofthedataset (e.g., ?personality) in the console.

Create a braincloud

First, create a folder with several PDFs (journal articles for example, but you can also use your own specific word list). Add an R script in it and run one of the following:

braincloud()
braincloud(image="brain1", text.size=0.6, colours.replicate=FALSE)

Note: these brainclouds are based on the work of Dr. Robin Carhart-Harris.

Compare a patient's score with the parent population

Your patient has an IQ of 78. What does it mean? You'd like to insert a plot in your report? Use the assess() fucntion, that compares your patient's score with the mean and standard deviation of your test (for the IQ, 100 and 15, respecetively).

assess(score=78, mean=100, sd=15)

You can also compare it to a custom parent distribution if you have the data. For example, your patient is 27 and you want to see where it stands compared to the participants of the `personality` dataset. You can also change the colours. See `?assess` for more documentation. ```R assess(score=27, distribution=personality$Age) ``` ```R "The participant (score = 27) is positioned at 0.02 standard deviations from the mean (M = 26.8, SD = 10.59). The participant's score is greater than 74.42 % of the general population." ```

To save the plot: ```R plot <- assess(score=27, distribution=personality$Age) ggsave("assess_plot.png", plot) ```

Get a correlation plot and table with significance stars

cortable(personality)

write.csv(cortable(personality), "mytable.csv") # Save the table
ggsave("corplot.png", cortable(personality)) # Save the plot

This function will automatically select the numeric columns of your dataframe and show a correlation table with significance stars. You can adjust the p value by applying different corrections or change the type of correlation type (Spearman's or Pearson's). You can also view the result in RStudio or save it as a .csv file to open it in excel. Run ?cortable for documentation.

Describe a dataframe

describe(personality)

This function prints a nice summary of your dataframe. Note that you can also group the descriptions by a factor using the "group" argument. See ?describe for more documentation.

You can also pipe the selection and filtering process using the power of dplyr:

personality %>%
  filter(Mood_Disorder=="Absence") %>%
  select(Sex, Antagonism, Negative_Affect, Extraversion) %>%
  describe(group="Sex")
Description of F 
 Numeric 
                mean median  var   sd valid.n
Antagonism      1.71    1.6 1.05 1.02     941
Negative_Affect 3.38    3.4 1.98 1.41     941
Extraversion    3.43    3.5 2.21 1.49     941

Description of M 
 Numeric 
                mean median  var   sd valid.n
Antagonism      2.37   2.20 1.56 1.25     245
Negative_Affect 2.65   2.60 1.74 1.32     245
Extraversion    3.27   3.25 2.30 1.52     245

Contribute

  • You need some help? You found a bug? You would like to request a new feature? Just open an issue ☺️
  • Want to add yourself a feature? Correct a bug? You're more than welcome to contribute! Check this tutorial (French or English) to see how to submit your changes on github.
  • Check this style guide to write R code with style.

Citation

Run the following commands to see the proper citation entry in APA6 or Bibtex format:

library("neuropsychology")
citation("neuropsychology")

Note: The authors do not give any warranty. If this software causes your keyboard to blow up, your brain to liquefy, your toilet to clog or a zombie plague to leak, the authors CANNOT IN ANY WAY be held responsible.

neuropsychology.r's People

Contributors

dominiquemakowski avatar palday avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.