ascAnon: Remove potentially identifying information from SRR *ASC...

View source: R/ascAnon.R

ascAnonR Documentation

Remove potentially identifying information from SRR *ASC file.

Description

Remove potentially identifying information from header of an SRR *ASC file. Write the new file to the current working directory. This is a superficial method of de-identification or anonymization, but it should do for most cases.

Usage

ascAnon(file, newName = NULL)

Arguments

file

Path to SRR *ASC file.

newName

Name to use for newly anonymized *ASC file. If an extension is included it will be ignored and replaced with "asc". If NULL (the default) will use the same name as the source *ASC file, but with "-anon" appended. In either case the same base filename will be used as the name of the *EDF filename in the "CONVERTED FROM" line of the anonynmized *ASC file.

Details

By default, newly created anonymous *ASC file will will use the same name as the source *ASC file, but with "-anon" appended. In this case, the same base filename will be used as the name of the *EDF filename in the "CONVERTED FROM" line of the anonynmized *ASC file. This is problematic in that, under our usual operating procedures, the filename itself usually consists of an identifier that is uniquely traceable to the participant. In order to make the file truly anonymous, the newName argument must be used.

If newName is provided, that will be used as the basename for the EDF file in the CONVERTED FROM line, as well as the output file name.

Value

Filename and path to anonymized file.

Author(s)

Dave Braze <davebraze@gmail.com>

Examples

file <- system.file("extdata/1950168.asc.gz", package="FDBeye")
ascAnon(file)
ascAnon(file, newName="fred") # TODO: this throws a warning when run on a .gz file. Sort it out.

davebraze/FDBeye documentation built on April 28, 2022, 1:20 a.m.