mteb/BrightProStackoverflowRetrieval huggingface dataset:
.6.2) .

_ R  has no single precision data type. All real numbers are stored in double
precision format _ . The functions ` as.single ` and ` single ` are identical
to ` as.double ` and ` double ` except they set the attribute ` Csingle ` that
is used in the ` [ .C ](/link/.C?package=base&version=3.6.2) ` and ` [
.Fortran ](/link/.Fortran?package=base&version=3.6.2) ` interface, and they
are intended only to be used in that context.

##  References

Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) _The New S Language_ .
Wadsworth & Brooks/Cole.

[ https://en.wikipedia.org/wiki/IEEE_754-1985
](https://en.wikipedia.org/wiki/IEEE_754-1985) , [
https://en.wikipedia.org/wiki/IEEE_754-2008
](https://en.wikipedia.org/wiki/IEEE_754-2008) , [
https://en.wikipedia.org/wiki/Double_precision
](https://en.wikipedia.org/wiki/Double_precision) , [
https://en.wikipedia.org/wiki/Denormal_number
](https://en.wikipedia.org/wiki/Denormal_number) .

[ http://754r.ucbtest.org/ ](http://754r.ucbtest.org/) for links to
information on the standards.

##  See Also

` [ integer ](/link/integer?package=base&version=3.6.2) ` , ` [ numeric
](/link/numeric?package=base&version=3.6.2) ` , ` [ storage.mode
](/link/storage.mode?package=base&version=3.6.2) ` .

##  Examples

[ Run this code
](https://app.datacamp.com/workspace/preview?_tag=rdocs&rdocsPath=packages%2Fbase%2Fversions%2F3.6.2%2Ftopics%2Fdouble&utm_source=r-docs&utm_medium=docs&utm_term=double&utm_content=run_example_in_workspace)

    
    
    # NOT RUN {
    is.double(1)
    all(double(3) == 0)
    # }
    

Run the code above in your browser using  [ DataCamp Workspace
](https://app.datacamp.com/workspace/preview?_tag=rdocs&rdocsPath=packages%2Fbase%2Fversions%2F3.6.2%2Ftopics%2Fdouble&utm_source=r-docs&utm_medium=docs&utm_term=double&utm_content=run_example_in_workspace)

Powered by  [ DataCamp ](https://www.datacamp.com/)
[ RDocumentation ](/)

Moon  [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)

Search all packages and functions

[ base  (version  3.6.2  ) ](/packages/base/versions/3.6.2)

#  hexmode: Display Numbers in Hexadecimal

##  Description

Convert or print integers in hexadecimal format, with as many digits as are
needed to display the largest, using leading zeroes as necessary.

##  Usage

    
    
    as.hexmode(x)
    
    # S3 method for hexmode
    as.character(x, …)
    
    # S3 method for hexmode
    format(x, width = NULL, upper.case = FALSE, …)
    
    # S3 method for hexmode
    print(x, …)

##  Arguments

x

An object, for the methods inheriting from class ` "hexmode" ` .

width

` NULL ` or a positive integer specifying the minimum field width to be used,
with padding by leading zeroes.

upper.case

a logical indicating whether to use upper-case letters or lower-case letters
(default).

…

further arguments passed to or from other methods.

##  Details

Class ` "hexmode" ` consists of integer vectors with that class attribute,
used merely to ensure that they are printed in hex.

If ` width = NULL ` (the default), the output is padded with leading zeroes to
the smallest width needed for all the non-missing elements.

` as.hexmode ` can convert integers (of [ type
](/link/type?package=base&version=3.6.2) ` "integer" ` or ` "double" ` ) and
character vectors whose elements contain only ` 0-9 ` , ` a-f ` , ` A-F ` (or
are ` NA ` ) to class ` "hexmode" ` .

There is a ` [ ! ](/link/!?package=base&version=3.6.2) ` method and methods for ` [ | ](/link/%7C?package=base&version=3.6.2) ` and ` [ & ](/link/%26amp%3B?package=base&version=3.6.2) ` :  these recycle their arguments to the length of the longer and then apply the operators bitwise to each element. 

##  See Also

` [ octmode ](/link/octmode?package=base&version=3.6.2) ` , ` [ sprintf
](/link/sprintf?package=base&version=3.6.2) ` for other options in converting
integers to hex, ` [ strtoi ](/link/strtoi?package=base&version=3.6.2) ` to
convert hex strings to integers.

##  Examples

[ Run this code
](https://app.datacamp.com/workspace/preview?_tag=rdocs&rdocsPath=packages%2Fbase%2Fversions%2F3.6.2%2Ftopics%2Fhexmode&utm_source=r-docs&utm_medium=docs&utm_term=hexmode&utm_content=run_example_in_workspace)

    
    
    # NOT RUN {
    i <- as.hexmode("7fffffff")
    i; class(i)
    identical(as.integer(i), .Machine$integer.max)
    
    hm <- as.hexmode(c(NA, 1)); hm
    as.integer(hm)
    # }
    

Run the code above in your browser using  [ DataCamp Workspace
](https://app.datacamp.com/workspace/preview?_tag=rdocs&rdocsPath=packages%2Fbase%2Fversions%2F3.6.2%2Ftopics%2Fhexmode&utm_source=r-docs&utm_medium=docs&utm_term=hexmode&utm_content=run_example_in_workspace)

Powered by  [ DataCamp ](https://www.datacamp.com/)
[ RDocumentation ](/)

Moon  [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)

Search all packages and functions

[ micropan  (version  1.0  ) ](/packages/micropan/versions/1.0)

#  setLeafAttributes: Setting leaf attributes

##  Description

Function used to set leaf attributes in a pan-genome tree.

##  Usage

    
    
    setLeafAttributes(node, lab.names, lab.col, lab.cex)
    branchPos(mergeMatrix, ordering)

##  Arguments

node

The ` [ dendrogram ](/link/dendrogram?package=micropan&version=1.0) ` node.

lab.names

Vector of node labels.

lab.col

Vector of node label colors.

lab.cex

Scaling of label fontsize.

mergeMatrix

Matrix of merged brances, see ` [ hclust
](/link/hclust?package=micropan&version=1.0) ` for details.

ordering

Order of merged brances, see ` [ hclust
](/link/hclust?package=micropan&version=1.0) ` for details.

##  Details

These functions are used by ` [ panTree
](/link/panTree?package=micropan&version=1.0) ` . ` setLeafAttributes ` is
used in a call to ` [ dendrapply
](/link/dendrapply?package=micropan&version=1.0) ` in order to set leaf
attributes in the ` [ dendrogram
](/link/dendrogram?package=micropan&version=1.0) ` . ` branchPos ` and `
clusterSignature ` are used to add bootstrap-values to the pan-genome tree.
You would never call these functions explicitly.

##  See Also

` [ panTree ](/link/panTree?package=micropan&version=1.0) ` .

##  Examples

[ Run this code
](https://www.datacamp.com/datalab/preview?_tag=rdocs&rdocsPath=packages%2Fmicropan%2Fversions%2F1.0%2Ftopics%2FsetLeafAttributes&utm_source=r-docs&utm_medium=docs&utm_term=setLeafAttributes&utm_content=run_example_in_datalab)

    
    
    # You should not call these functions explicitly.
    

Run the code above in your browser using  [ DataLab
](https://www.datacamp.com/datalab/preview?_tag=rdocs&rdocsPath=packages%2Fmicropan%2Fversions%2F1.0%2Ftopics%2FsetLeafAttributes&utm_source=r-docs&utm_medium=docs&utm_term=setLeafAttributes&utm_content=run_example_in_datalab)

Powered by  [ DataCamp ](https://www.datacamp.com/)
nge to have warning messages emitted when unsupported options are used.
This is done by setting either of the options ` verbose ` or ` warn ` to be
non-zero via the ` [ options ](/link/options?package=base&version=3.6.2) `
function.

There is a short discussion of these additional arguments with some example
code available at [ http://www.stat.ucdavis.edu/~duncan/R/dynload/
](http://www.stat.ucdavis.edu/~duncan/R/dynload/) .

External code must not change the floating point control word, but many DLLs
do so. Common changes are to set it to use 53 bit precision instead of R's
default 64 bit precision, or to unmask some exceptions. ` dyn.load ` detects
such changes, and restores R's control word to its default value of hex 8001F.
This may cause the DLL to malfunction; if so, it should be rewritten to save
and restore the control word itself. If ` warn.FPU ` is set to ` TRUE ` using
the ` [ options ](/link/options?package=base&version=3.6.2) ` function, a
warning will be printed. (If the warning says that the control word was
changed from some other value than 8001F, please report the circumstances to
the Windows maintainers: that probably indicates an internal bug.)

##  References

Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) _The New S Language_ .
Wadsworth & Brooks/Cole.

##  See Also

` [ library.dynam ](/link/library.dynam?package=base&version=3.6.2) ` to be
used inside a package's ` [ .onLoad
](/link/.onLoad?package=base&version=3.6.2) ` initialization.

` [ SHLIB ](/link/SHLIB?package=base&version=3.6.2) ` for how to create
suitable DLLs.

` [ .C ](/link/.C?package=base&version=3.6.2) ` , ` [ .Fortran
](/link/.Fortran?package=base&version=3.6.2) ` , ` [ .External
](/link/.External?package=base&version=3.6.2) ` , ` [ .Call
](/link/.Call?package=base&version=3.6.2) ` .

##  Examples

[ Run this code
](https://app.datacamp.com/workspace/preview?_tag=rdocs&rdocsPath=packages%2Fbase%2Fversions%2F3.6.2%2Ftopics%2Fdyn.load&utm_source=r-docs&utm_medium=docs&utm_term=dyn.load&utm_content=run_example_in_workspace)

    
    
    # NOT RUN {
    ## expect all of these to be false in R >= 3.0.0.
    is.loaded("supsmu") # Fortran entry point in stats
    is.loaded("supsmu", "stats", "Fortran")
    is.loaded("PDF", type = "External") # pdf() device in grDevices
    # }
    

Run the code above in your browser using  [ DataCamp Workspace
](https://app.datacamp.com/workspace/preview?_tag=rdocs&rdocsPath=packages%2Fbase%2Fversions%2F3.6.2%2Ftopics%2Fdyn.load&utm_source=r-docs&utm_medium=docs&utm_term=dyn.load&utm_content=run_example_in_workspace)

Powered by  [ DataCamp ](https://www.datacamp.com/)
[ RDocumentation ](/)

Moon  [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)

Search all packages and functions

[ base  (version  3.6.2  ) ](/packages/base/versions/3.6.2)

#  Ops.Date: Operators on the Date Class

##  Description

Operators for the ` " [ Date ](/link/Date?package=base&version=3.6.2) " `
class.

There is an ` [ Ops
](/link/Ops?package=base&version=3.6.2&to=%3DS3groupGeneric) ` method and
specific methods for ` + ` and ` - ` for the ` [ Date
](/link/Date?package=base&version=3.6.2) ` class.

##  Usage

    
    
    date + x
    x + date
    date - x
    date1 lop date2

##  Arguments

date

date objects

date1, date2

date objects or character vectors. (Character vectors are converted by ` [
as.Date ](/link/as.Date?package=base&version=3.6.2) ` .)

x

a numeric vector (in days) _or_ an object of class ` " [ difftime
](/link/difftime?package=base&version=3.6.2) " ` , rounded to the nearest
whole day.

lop

One of ` == ` , ` != ` , ` < ` , ` <= ` , ` > ` or ` >= ` .

##  Details

` x ` does not need to be integer if specified as a numeric vector, but see
the comments about fractional days in the help for ` [ Dates
](/link/Dates?package=base&version=3.6.2) ` .

##  Examples

[ Run this code
](https://app.datacamp.com/workspace/preview?_tag=rdocs&rdocsPath=packages%2Fbase%2Fversions%2F3.6.2%2Ftopics%2FOps.Date&utm_source=r-docs&utm_medium=docs&utm_term=Ops.Date&utm_content=run_example_in_workspace)

    
    
    # NOT RUN {
    (z <- Sys.Date())
    z + 10
    z < c("2009-06-01", "2010-01-01", "2015-01-01")
    # }
    

Run the code above in your browser using  [ DataCamp Workspace
](https://app.datacamp.com/workspace/preview?_tag=rdocs&rdocsPath=packages%2Fbase%2Fversions%2F3.6.2%2Ftopics%2FOps.Date&utm_source=r-docs&utm_medium=docs&utm_term=Ops.Date&utm_content=run_example_in_workspace)

Powered by  [ DataCamp ](https://www.datacamp.com/)
[ RDocumentation ](/)

Moon  [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)

Search all packages and functions

[ base  (version  3.6.2  ) ](/packages/base/versions/3.6.2)

#  getCallingDLL: Compute DLL for Native Interface Call

##  Description

This is an internal function that is called from  R  's C code to determine
the enclosing namespace of a ` .C ` / ` .Call ` / ` .Fortran ` / ` .External `
call which has no ` PACKAGE ` argument. If the call has been made from a
function within a namespace, then we can find the DLL associated with that
namespace. The purpose of this is to avoid having to use the ` PACKAGE `
argument in these native calls and so better support versions of packages.

This is an internal function that may be migrated to internal C code in the
future and so should not be used by  R  programmers.

##  Usage

    
    
    getCallingDLL(f = sys.function(-1), doStop = FALSE)
    getCallingDLLe(e)

##  Arguments

f

the function whose namespace and DLL are to be found. By default, this is the
current function being called which is the one in which the native routine is
being invoked.

doStop

a logical value indicating whether failure to find a namespace and/or DLL is
an error ( ` TRUE ` ) or not ( ` FALSE ` ). The default is ` FALSE ` so that
when this is called because there is no ` PACKAGE ` argument in a ` [ .C
](/link/.C?package=base&version=3.6.2) ` , ` [ .Call
](/link/.Call?package=base&version=3.6.2) ` , ` [ .Fortran
](/link/.Fortran?package=base&version=3.6.2) ` , ` [ .External
](/link/.External?package=base&version=3.6.2) ` call, no error occurs and the
regular lookup is performed by searching all DLLs in order.

e

an environment.

##  See Also

` [ .C ](/link/.C?package=base&version=3.6.2) ` , ` [ .Call
](/link/.Call?package=base&version=3.6.2) ` , ` [ .Fortran
](/link/.Fortran?package=base&version=3.6.2) ` , ` [ .External
](/link/.External?package=base&version=3.6.2) `

##  Examples

[ Run this code
](https://app.datacamp.com/workspace/preview?_tag=rdocs&rdocsPath=packages%2Fbase%2Fversions%2F3.6.2%2Ftopics%2FgetCallingDLL&utm_source=r-docs&utm_medium=docs&utm_term=getCallingDLL&utm_content=run_example_in_workspace)

    
    
    # NOT RUN {
    if(exists("ansari.test"))
       getCallingDLL(ansari.test)
    # }
    

Run the code above in your browser using  [ DataCamp Workspace
](https://app.datacamp.com/workspace/preview?_tag=rdocs&rdocsPath=packages%2Fbase%2Fversions%2F3.6.2%2Ftopics%2FgetCallingDLL&utm_source=r-docs&utm_medium=docs&utm_term=getCallingDLL&utm_content=run_example_in_workspace)

Powered by  [ DataCamp ](https://www.datacamp.com/)
[ RDocumentation ](/)

Moon  [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)

Search all packages and functions

[ base  (version  3.6.2  ) ](/packages/base/versions/3.6.2)

#  bitwise: Bitwise Logical Operations

##  Description

Logical operations on integer vectors with elements viewed as sets of bits.

##  Usage

    
    
    bitwNot(a)
    bitwAnd(a, b)
    bitwOr(a, b)
    bitwXor(a, b)
    
    bitwShiftL(a, n)
    bitwShiftR(a, n)

##  Arguments

a, b

integer vectors; numeric vectors are coerced to integer vectors.

n

non-negative integer vector of values up to 31.

##  Value

An integer vector of length the longer of the arguments, or zero length if one
is zero-length.

The output element is ` NA ` if an input is ` NA ` (after coercion) or an
invalid shift.

##  Details

Each element of an integer vector has 32 bits.

Pairwise operations can result in integer ` NA ` .

Shifting is done assuming the values represent unsigned integers.

##  See Also

The logical operators, ` [ ! ](/link/!?package=base&version=3.6.2) ` , ` [ & ](/link/%26amp%3B?package=base&version=3.6.2) ` , ` [ | ](/link/%7C?package=base&version=3.6.2) ` , ` [ xor ](/link/xor?package=base&version=3.6.2) ` . Notably these _do_ work bitwise for ` [ raw ](/link/raw?package=base&version=3.6.2) ` arguments. 

The classes ` " [ octmode ](/link/octmode?package=base&version=3.6.2) " ` and
` " [ hexmode ](/link/hexmode?package=base&version=3.6.2) " ` whose
implementation of the standard logical operators is based on these functions.

Package bitops has similar functions for numeric vectors which differ in the
way they treat integers \\(2^{31}\\) or larger.

##  Examples

[ Run this code
](https://app.datacamp.com/workspace/preview?_tag=rdocs&rdocsPath=packages%2Fbase%2Fversions%2F3.6.2%2Ftopics%2Fbitwise&utm_source=r-docs&utm_medium=docs&utm_term=bitwise&utm_content=run_example_in_workspace)

    
    
    # NOT RUN {
    bitwNot(0:12) # -1 -2  ... -13
    bitwAnd(15L, 7L) #  7
    bitwOr (15L, 7L) # 15
    bitwXor(15L, 7L) #  8
    bitwXor(-1L, 1L) # -2
    
    ## The "same" for 'raw' instead of integer :
    rr12 <- as.raw(0:12) ; rbind(rr12, !rr12)
    c(r15 <- as.raw(15), r7 <- as.raw(7)) #  0f 07
    r15 & r7    # 07
    r15 | r7    # 0f
    xor(r15, r7)# 08
    
    bitwShiftR(-1, 1:31) # shifts of 2^32-1 = 4294967295
    # }
    

Run the code above in your browser using  [ DataCamp Workspace
](https://app.datacamp.com/workspace/preview?_tag=rdocs&rdocsPath=packages%2Fbase%2Fversions%2F3.6.2%2Ftopics%2Fbitwise&utm_source=r-docs&utm_medium=docs&utm_term=bitwise&utm_content=run_example_in_workspace)

Powered by  [ DataCamp ](https://www.datacamp.com/)
[ RDocumentation ](/)

Moon  [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)

Search all packages and functions

[ base  (version  3.6.2  ) ](/packages/base/versions/3.6.2)

#  zpackages: Listing of Packages

##  Description

` .packages ` returns information about package availability.

##  Usage

    
    
    .packages(all.available = FALSE, lib.loc = NULL)

##  Arguments

all.available

logical; if ` TRUE ` return a character vector of all available packages in `
lib.loc ` .

lib.loc

a character vector describing the location of  R  library trees to search
through, or ` NULL ` . The default value of ` NULL ` corresponds to ` [
.libPaths ](/link/.libPaths?package=base&version=3.6.2) () ` .

##  Value

A character vector of package base names, invisible unless ` all.available =
TRUE ` .

##  Details

` .packages() ` returns the names of the currently attached packages
_invisibly_ whereas ` .packages(all.available = TRUE) ` gives (visibly) _all_
packages available in the library location path ` lib.loc ` .

For a package to be regarded as being ‘available’ it must have valid metadata
(and hence be an installed package). However, this will report a package as
available if the metadata does not match the directory name: use ` [
find.package ](/link/find.package?package=base&version=3.6.2) ` to confirm
that the metadata match or ` [ installed.packages
](/link/installed.packages?package=base&version=3.6.2) ` for a much slower but
more comprehensive check of ‘available’ packages.

##  See Also

` [ library ](/link/library?package=base&version=3.6.2) ` , ` [ .libPaths
](/link/.libPaths?package=base&version=3.6.2) ` , ` [ installed.packages
](/link/installed.packages?package=base&version=3.6.2) ` .

##  Examples

[ Run this code
](https://app.datacamp.com/workspace/preview?_tag=rdocs&rdocsPath=packages%2Fbase%2Fversions%2F3.6.2%2Ftopics%2Fzpackages&utm_source=r-docs&utm_medium=docs&utm_term=zpackages&utm_content=run_example_in_workspace)

    
    
    # NOT RUN {
    (.packages())               # maybe just "base"
    .packages(all.available = TRUE) # return all available as character vector
    require(splines)
    (.packages())               # "splines", too
    detach("package:splines")
    # }
    

Run the code above in your browser using  [ DataCamp Workspace
](https://app.datacamp.com/workspace/preview?_tag=rdocs&rdocsPath=packages%2Fbase%2Fversions%2F3.6.2%2Ftopics%2Fzpackages&utm_source=r-docs&utm_medium=docs&utm_term=zpackages&utm_content=run_example_in_workspace)

Powered by  [ DataCamp ](https://www.datacamp.com/)
[ RDocumentation ](/)

Moon  [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)

Search all packages and functions

[ base  (version  3.6.2  ) ](/packages/base/versions/3.6.2)

#  Hyperbolic: Hyperbolic Functions

##  Description

These functions give the obvious hyperbolic functions. They respectively
compute the hyperbolic cosine, sine, tangent, and their inverses, arc-cosine,
arc-sine, arc-tangent (or ‘ _area cosine_ ’, etc).

##  Usage

    
    
    cosh(x)
    sinh(x)
    tanh(x)
    acosh(x)
    asinh(x)
    atanh(x)

##  Arguments

x

a numeric or complex vector

##  S4 methods

All are S4 generic functions: methods can be defined for them individually or
via the ` [ Math ](/link/Math?package=base&version=3.6.2&to=%3DS4groupGeneric)
` group generic.

##  Details

These are [ internal generic
](/link/internal%20generic?package=base&version=3.6.2) [ primitive
](/link/primitive?package=base&version=3.6.2) functions: methods can be
defined for them individually or via the ` [ Math
](/link/Math?package=base&version=3.6.2&to=%3DS3groupGeneric) ` group generic.

Branch cuts are consistent with the inverse trigonometric functions ` asin `
_et seq_ , and agree with those defined in Abramowitz and Stegun, figure 4.7,
page 86. The behaviour actually on the cuts follows the C99 standard which
requires continuity coming round the endpoint in a counter-clockwise
direction.

##  References

Abramowitz, M. and Stegun, I. A. (1972) _Handbook of Mathematical Functions._
New York: Dover. Chapter 4. Elementary Transcendental Functions: Logarithmic,
Exponential, Circular and Hyperbolic Functions

##  See Also

The trigonometric functions, ` [ cos ](/link/cos?package=base&version=3.6.2) `
, ` [ sin ](/link/sin?package=base&version=3.6.2) ` , ` [ tan
](/link/tan?package=base&version=3.6.2) ` , and their inverses ` [ acos
](/link/acos?package=base&version=3.6.2) ` , ` [ asin
](/link/asin?package=base&version=3.6.2) ` , ` [ atan
](/link/atan?package=base&version=3.6.2) ` .

The logistic distribution function ` [ plogis
](/link/plogis?package=base&version=3.6.2) ` is a shifted version of ` tanh()
` for numeric ` x ` .

Powered by  [ DataCamp ](https://www.datacamp.com/)