The R Project SVN R

Rev

Rev 74519 | Rev 85925 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 74519 Rev 74546
Line 1... Line 1...
1
% File src/library/base/man/readChar.Rd
1
% File src/library/base/man/readChar.Rd
2
% Part of the R package, https://www.R-project.org
2
% Part of the R package, https://www.R-project.org
3
% Copyright 1995-2013 R Core Team
3
% Copyright 1995-2018 R Core Team
4
% Distributed under GPL 2 or later
4
% Distributed under GPL 2 or later
5
 
5
 
6
\name{readChar}
6
\name{readChar}
7
\alias{readChar}
7
\alias{readChar}
8
\alias{writeChar}
8
\alias{writeChar}
Line 102... Line 102...
102
  \code{\link{connections}}, \code{\link{readLines}},
102
  \code{\link{connections}}, \code{\link{readLines}},
103
  \code{\link{writeLines}}, \code{\link{readBin}}
103
  \code{\link{writeLines}}, \code{\link{readBin}}
104
}
104
}
105
\examples{
105
\examples{
106
## test fixed-length strings
106
## test fixed-length strings
107
zzfil <- tempfile(fileext = "testchar")
107
zzfil <- tempfile("testchar")
108
zz <- file(zzfil, "wb")
108
zz <- file(zzfil, "wb")
109
x <- c("a", "this will be truncated", "abc")
109
x <- c("a", "this will be truncated", "abc")
110
nc <- c(3, 10, 3)
110
nc <- c(3, 10, 3)
111
writeChar(x, zz, nc, eos = NULL)
111
writeChar(x, zz, nc, eos = NULL)
112
writeChar(x, zz, eos = "\r\n")
112
writeChar(x, zz, eos = "\r\n")