Import data

Any format of data table can be imported in R. For the ERP users who are not used to R, we show here how to import data originally stored into an Excel file as erpcz, which is not the most intuitive. Note that it is conjectured that each row of the dataset is assigned to an ERP curve. Apart from the timepoints for which the ERPs are measured, the dataset may contain additional columns such as the subject identifier or experimental covariates (here, the membership to the TBR or TBF group).

One way of importing Excel file is by using the R package ‘XLConnect’. If it is not yet installed, you have first to do it:


If this is the first package installation, a dialog box will appear, asking you to choose a CRAN mirror (at least if you are running R in Windows). Please follow the instructions until the installation is completed.

Once the package is installed, than load it into the current R working session:


The following commands can now be used to import the Excel dataset:

wb = loadWorkbook("")
erpcz = readWorksheet(wb,"erpcz")

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s