r_has_jpeg_capability: Does R have a capability?

Description Usage Arguments Value See Also Examples

View source: R/r-has-capability.R

Description

Check to see if R has a specific capability.

Usage

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
assert_r_has_jpeg_capability(
  severity = getOption("assertive.severity", "stop")
)

assert_r_has_png_capability(severity = getOption("assertive.severity", "stop"))

assert_r_has_tiff_capability(
  severity = getOption("assertive.severity", "stop")
)

assert_r_has_tcltk_capability(
  severity = getOption("assertive.severity", "stop")
)

assert_r_has_x11_capability(severity = getOption("assertive.severity", "stop"))

assert_r_has_aqua_capability(
  severity = getOption("assertive.severity", "stop")
)

assert_r_has_http_ftp_capability(
  severity = getOption("assertive.severity", "stop")
)

assert_r_has_sockets_capability(
  severity = getOption("assertive.severity", "stop")
)

assert_r_has_libxml_capability(
  severity = getOption("assertive.severity", "stop")
)

assert_r_has_fifo_capability(
  severity = getOption("assertive.severity", "stop")
)

assert_r_has_cledit_capability(
  severity = getOption("assertive.severity", "stop")
)

assert_r_has_iconv_capability(
  severity = getOption("assertive.severity", "stop")
)

assert_r_has_nls_capability(severity = getOption("assertive.severity", "stop"))

assert_r_has_rprof_capability(
  severity = getOption("assertive.severity", "stop")
)

assert_r_has_profmem_capability(
  severity = getOption("assertive.severity", "stop")
)

assert_r_has_cairo_capability(
  severity = getOption("assertive.severity", "stop")
)

assert_r_has_icu_capability(severity = getOption("assertive.severity", "stop"))

assert_r_has_long_double_capability(
  severity = getOption("assertive.severity", "stop")
)

assert_r_has_libcurl_capability(
  severity = getOption("assertive.severity", "stop")
)

r_has_jpeg_capability()

r_has_png_capability()

r_has_tiff_capability()

r_has_tcltk_capability()

r_has_x11_capability()

r_has_aqua_capability()

r_has_http_ftp_capability()

r_has_sockets_capability()

r_has_libxml_capability()

r_has_fifo_capability()

r_has_cledit_capability()

r_has_iconv_capability()

r_has_nls_capability()

r_has_rprof_capability()

r_has_profmem_capability()

r_has_cairo_capability()

r_has_icu_capability()

r_has_long_double_capability()

r_has_libcurl_capability()

Arguments

severity

How severe should the consequences of the assertion be? Either "stop", "warning", "message", or "none".

Value

The is_* functions return TRUE if R has the capability and FALSE (with a cause) otherwise. The assert_* functions return nothing but throw an error if the corresponding is_* function returns FALSE.

See Also

capabilities

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
if(r_has_png_capability())
{
  png("test.png")
  with(cars, plot(speed, dist))
  dev.off()
} else 
{
  pdf("test.pdf")
  with(cars, plot(speed, dist))
  dev.off()
}

## End(Not run)

assertive.reflection documentation built on July 31, 2020, 1:06 a.m.