File: clone.Rd

package info (click to toggle)
r-cran-bit 4.6.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,000 kB
  • sloc: ansic: 5,145; sh: 13; makefile: 6
file content (54 lines) | stat: -rw-r--r-- 1,102 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
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/clone.R
\name{clone}
\alias{clone}
\alias{clone.default}
\title{Cloning ff and ram objects}
\usage{
clone(x, ...)

\method{clone}{default}(x, ...)
}
\arguments{
\item{x}{\code{x} an R object}

\item{...}{further arguments to the generic}
}
\value{
an object that is a deep copy of x
}
\description{
\code{clone} physically duplicates objects and can additionally change
some features, e.g. length.
}
\details{
\code{clone} is generic.  \code{clone.default} handles ram objects.
Further methods are provided in package 'ff'.
\code{still.identical} returns TRUE if the two atomic arguments still
point to the same memory.
}
\section{Methods (by class)}{
\itemize{
\item \code{clone(default)}: default method uses R's C-API 'duplicate()'

}}
\examples{

  x <- 1:12
  y <- x
  still.identical(x, y)
  y[1] <- y[1]
  still.identical(x, y)
  y <- clone(x)
  still.identical(x, y)
  rm(x, y); gc()

}
\seealso{
\code{clone.ff}, \code{\link[=copy_vector]{copy_vector()}}
}
\author{
Jens Oehlschlägel
}
\keyword{IO}
\keyword{data}