make_refcode | R Documentation |
This function creates reference codes by pasting name
, year
, yname
,
sex
and sub
fields. The result is a string that identifies the
reference.
make_refcode(name = "", year = "", yname = "", sex = "", sub = "")
name |
Character vector identifying the reference name field |
year |
Character vector identifying the reference year field |
yname |
Character vector identifying the reference yname field |
sex |
Character vector identifying the reference sex field |
sub |
Character vector identifying the reference sub field |
A character vector with n
elements, where n
equals the longest
vector in the input arguments.
The function silently converts any zero-length arguments to length 1
.
The procedure aborts with an error if the length of any input is unequal to
either 1
or n
.
data <- data.frame(hgt = c(56, 42, 53),
age = c(0.1, 0.2, 0.15),
sex = c("male", "female", "female"),
ga = c(40, 27, 39))
r <- make_refcode("who", "2006", "hgt", data$sex)
r
head(load_reference(r))
head(load_reference(r, "study"))
head(load_reference(r[2]))
head(load_reference(r[2], "study"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.