The NPL package, standing for NeuroPsychoLinguistic group package, is a collection of functions I needed to write during my PhD in the NeuroPsycholinguistic lab of the UNIGE. Some of the functions aim at helping the researcher to analyse behavioral or EEG data. The EEG functions intend mostly to fill the gap between the different softwares used in our lab (Cartool: https://sites.google.com/site/cartoolcommunity/ ; STEN: https://www.unil.ch/line/en/home/menuinst/mission/about-the-line/software--analysis-tools.html ; Ragu: http://www.thomaskoenig.ch/index.php/work/ragu), or to perform statistical analyses on the EEG data.
The NPL package uses some other packages. Please be sure that all the following packages are installed and up to date:
install.packages("ggplot2")
install.packages("dplyr")
install.packages("tidyr")
install.packages("tibble")
install.packages("ggpubr")
install.packages("bannerCommenter")
install.packages("lme4")
install.packages("lmerTest")
install.packages("car")
install.packages("emmeans")
install.packages("cAIC4")
install.packages("nlme")
install.packages("DescTools")
install.packages("stringr")
install.packages("RColorBrewer")
install.packages("abind")
install.packages(stringr)
If you encounter problem to install these packages, please update your R and Rstudio versions.
Step 1: install the devtools package using the following command line
install.packages("devtools")
Step 2: load the devtools package
library("devtools")
Step 3: download and install the NPL package
install_github("EricMenetre/NPL")
Step 4: load the package like any other package anytime you want to use it
library(NPL)
The package will be improved over time, please update regularly your package version using the command line given at the third step.
If you encounter problem to install these packages, please update your R and Rstudio versions. If the problem persists, be sure that the path where the package is saved does not contains accents. To find out where the packages downloaded from GitHub are saved use the ?install_github()
command (after loading the package devtools). If the path contains accents, for PC owners, create a temporary folder on the root directory of your C disk, and use the .libPaths("C:/your_new_folder")
command and repeat the installation process. When the process is done, copy the NPL folder from the temporary folder to your library. You will find the path in the ?install_github()
command. For mac user, the problem did not occured yet. If so, please contact Eric Ménétré.
If you notice a bug or you have trouble using a function, please contact me at: Eric.Menetre@unige.ch
Please visit: https://www.unige.ch/fapse/psycholinguistique/equipes/npl/membres/eric-menetre/
citation("NPL")
A complete tutorial on how to use these functions is available here. To download the tutorial, click on code and then download as .zip.
list()
function) of lmer or glmer models and returns a table containing all the fitting information available (AIC; BIC; log likelihood; deviance; number of residual DF). The models are then ordered according to the smallest AIC.list()
function) and returns a cross table matrix (N models from the list times N models from the list) and gives the anova()
of the models two by two. This helps chosing the model with the best fitting. The user should check the simpler model compared to the same model with one more parameter. If the p-value is significant, then take this model as reference and continue so until reaching the most complex model with a significantly better fitting than the previous one. help(plot_microstates)
to see the different options.r my_number
patients outperformed the controls" might get printed as "2 patients outperformed the controls". The function allows to write it as "r number_to_word(my_number, cap = TRUE)
patients outperformed the controls", which might get now printed as "Two patients outperformed the controls".anova()
of a model, the Anova()
(from the car package), the result from a chisq.test()
model, a post-hoc emmeans()
model and the summary()
of a model. See help(report_results)
for more details. To avoid format problem, when copying results in Word, paste only the values instead of using a simple paste.If you need a specific tool to analyse your data do not hesitate to come to me and we can surely figure something out ;-)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.