Description Usage Arguments Value See Also Examples
Makes either a table of Data-Field and description, or a named vector handy for looking up descriptive name by column names in the UKB fileset tab file.
1 | ukb_df_field(fileset, path = ".", data.pos = 2, as.lookup = FALSE)
|
fileset |
The prefix for a UKB fileset, e.g., ukbxxxx (for ukbxxxx.tab, ukbxxxx.r, ukbxxxx.html) |
path |
The path to the directory containing your UKB fileset. The default value is the current directory. |
data.pos |
Locates the data in your .html file. The .html file is read into a list; the default value data.pos = 2 indicates the second item in the list. (The first item in the list is the title of the table). You will probably not need to change this value, but if the need arises you can open the .html file in a browser and identify where in the file the data is. |
as.lookup |
If set to TRUE, returns a named |
Returns a data.frame with columns field.showcase
, field.html
, field.tab
, names
. field.showcase
is how the field appears in the online UKB showcase; field.html
is how the field appears in the html file in your UKB fileset; field.tab
is how the field appears in the tab file in your fileset; and names
is the descriptive name that ukb_df
assigns to the variable. If as.lookup = TRUE
, the function returns a named character vector of the descriptive names.
1 2 3 4 5 6 | ## Not run:
# UKB field-to-description for ukb1234.tab, ukb1234.r, ukb1234.html
ukb_df_field("ukb1234")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.