vignettes/find-subject-timepoint.Rmd
find-subject-timepoint.Rmd
Data that comes from the MRI needs to be tagged with the subject timepoint. This is currently (as of 2020-03-17) the only data that is tagged with subject timepoint. The reason for the need of subject timepoint for this data is the Brain Imaging Data Structure (BIDS) that the MRI data are placed into, which requires this information. To ease the work of the MRI engineer, we add this information to the exported files from MRI, when we create dummy names. The information with the 7-digit ID, and the 2-digit timepoint should be clearly visible in the calendar, so that this information is easily available at scan. Note: the timepoint information is only needed in the exported files, not anywhere else.
To make it easier for the RAs to find this information, there are two alternatives using R-functions that come with the MOAS R-package.
If you are working on a Windows office PC at the University, find the Software center
in the windows menu, and locate R
, RStudio
, and rtools
, and click install to install them on your PC. Once they are installed, open RStudio
.
If you have a Mac, install R from this link, and Rstudio from this link. Install the programs like any other.
Open RStudio and in the RStudio console
(bottom left of the RStudio program), do the following:
If the last command outputs a numbered list asking you to choose which packages to update, type in the number for the “None” option. You may also choose “All” but this might take some time, depending on the number of packages it wants to update. If it additionally asks you Do you want to install from sources the package which needs compilation?
, always type n
, for no.
No matter which option you choose, the installation of the MOAS-packages takes some time, because it needs many other packages to work.
Warning: we know there is an issue with installing this package on the UiO office PCs. If the installation is failing, please follow this troubleshoot, and see if that fixed your problem.
After this, try installing again:
Once everything has been installed sucessfully, your computer will have the necessary setup to run the function to find the subject timepoints. Thankfully, once it is all installed, you don’t have to do these steps again!
The shiny launcher is arguably the easier for those who are unfamiliar with R and who do not feel comfortable using it.
In the Rstudio console
type:
This should open a website in your browser. Here, you need to navigate to and upload the MOAS.RData
file (on lagringshotell). Then you will be able to look for specific IDs and be provided information on the next timepoint for this participant.
If you are more familiar with R and RStudio in general, you might want to use the function directly in R, rather than open the shiny instance.
There are two ways you can do this, and you will need to know how to navigate to the MOAS file using paths in both.
In this variant, you use the R-console directly, meaning the same place you typed all the install commands above. If you are on a UiO windows machine, the function will only need an ID as input to work. This is convenient if you are only checking a couple of IDs
If you are on a mac, you will need to provide another path. If you are mounting the lagringshotell the exact way specified in the wiki on this, the path should be ~/LCBC/Projects/Cross_projects/MOAS/Data/MOAS.RData
.