File: CITATION

package info (click to toggle)
r-cran-corrplot 0.95-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,212 kB
  • sloc: sh: 13; makefile: 5
file content (24 lines) | stat: -rw-r--r-- 773 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
YEAR <- strftime(meta$Date, '%Y')

# all roles, see also http://www.loc.gov/marc/relators/relaterm.html
ALL <- eval(parse(text = meta$`Authors@R`))

# authors only
AUTHORS <- ALL[sapply(ALL$role, function(x) 'aut' %in% x)]
AUTHORS <- paste(AUTHORS$given, AUTHORS$family, collapse = ' and ')

bibentry('Manual',
  key = paste0(meta$Package, YEAR),
	title = sprintf('R package \'%s\': %s', meta$Package, meta$Title),
	author = AUTHORS,
	year = YEAR,
	note = sprintf('(Version %s)', meta$Version),
	url = meta$URL,

	mheader = sprintf('To cite %s in publications use:', meta$Package),

	textVersion = sprintf(
    '%s (%s). R package \'%s\': %s (Version %s). Available from %s',
    AUTHORS, YEAR, meta$Package, meta$Title, meta$Version, meta$URL
	)
)