File: move.Rd

package info (click to toggle)
r-cran-seqinr 3.4-5-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 5,876 kB
  • sloc: ansic: 1,987; makefile: 14
file content (43 lines) | stat: -rw-r--r-- 712 bytes parent folder | download | duplicates (4)
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
\name{move}
\alias{move}
\alias{mv}
\title{Rename an R object}
\description{
Rename object \code{from} into \code{to}.
}
\usage{
move(from, to)
mv(from, to)
}
\arguments{
  \item{from}{an R object name}
  \item{to}{the new R object name}
}
\value{
none.
}
\references{ 
\code{citation("seqinr")}
}
\author{J.R. Lobry}
\seealso{\code{\link{swap}} }

\examples{
#
# Example in a new empty environment:
#
local({
  zefplock <- pi
  print(ls())
  print(zefplock)
  mv(zefplock, toto)
  print(ls())
  print(toto)
  stopifnot(identical(toto, pi)) # Sanity check
})
#
# Check that self-affectation is possible:
#
mv(mv, mv) # force self-affectation for the function itself
mv(mv, mv) # OK, function mv() still exists
}