Extract the variables you want from the UKB database and create a CSV dataset.
Source:R/proj.R
proj_create_dataset.Rd
This function tells RAP to extract the variables you want from the .dataset
database file and to create a CSV file within the main RAP project folder.
When you want to use the CSV file in your own data analysis project, use
download_project_data()
. You probably don't need to run this function often,
probably only once at the start of your project. NOTE: This function takes
5-60 minutes to run on the UKB RAP, so be careful with just randomly running it.
Arguments
- fields
A character vector of field IDs you want to extract from the UKB database. Select the variable ids from the rap_variables dataset.
- output_path
The name of the output CSV file.
- database_id
The ID of the dataset, defaults to the one we use in the Steno UK Biobank DARE project.
Examples
if (FALSE) { # \dontrun{
proj_create_dataset(
c("eid", "p31", "p34"),
proj_create_path_dataset(rap_get_user())
)
} # }