File: Rdo_insert_element.Rd

package info (click to toggle)
r-cran-rdpack 2.6.6-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,156 kB
  • sloc: sh: 13; makefile: 4
file content (65 lines) | stat: -rw-r--r-- 1,358 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
\name{Rdo_insert_element}

\alias{Rdo_insert_element}

%- Also NEED an '\alias' for EACH other topic documented here.

\title{
  Insert a new element in an Rd object
}

\description{
  Insert a new element at a given position in an Rd object.
}

\usage{
Rdo_insert_element(rdo, val, pos)
}

%- maybe also 'usage' for other objects documented here.

\arguments{
  \item{rdo}{an Rd object}
  \item{val}{the content to insert.}
  \item{pos}{position at which to insert \code{val}, typically an integer
    but may be anything accepted by the operator "[[".
  }
}

\details{
  \code{val} is inserted at position \code{pos}, between the elements at
  positions \code{pos-1} and \code{pos}. If \code{pos} is equal to 1,
  \code{val} is prepended to \code{rdo}. If \code{pos} is missing or
  equal to the length of \code{rdo}, \code{val} is appended to
  \code{rdo}.

  todo: allow vector \code{pos} to insert deeper into the object.

  todo: character \code{pos} to insert at a position specified by "tag" for example?

  todo: more guarded copying of attributes?
}

\value{
  an Rd object
}



\author{Georgi N. Boshnakov}




%% ~Make other sections like Warning with \section{Warning }{....} ~




% Add one or more standard keywords, see file 'KEYWORDS' in the

% R documentation directory.

%\keyword{RdoProgramming}
%\keyword{RdoElements}
\keyword{RdoBuild}