ID EN
Data Types & Classes

rawConnection

R Base 3.6.2 🇮🇩 Bahasa Indonesia

Koneksi mentah input dan output.

Syntax

R
rawConnection(object, open = "r")<p></p><p>rawConnectionValue(con)</p>

Arguments

Parameter Deskripsi
object character or raw vector. A description of the connection. For an input this is an R raw vector object, and for an output connection the name for the connection.
open character. Any of the standard connection open modes.
con An output raw connection.

Return Value

Untuk rawConnection, objek koneksi kelas "rawConnection" yang mewarisi dari kelas "koneksi". Untuk rawConnectionValue, vektor mentah.

Details

Koneksi mentah masukan dibuka dan vektor mentah disalin pada saat objek koneksi dibuat, dan penutupan menghancurkan salinannya. Koneksi mentah keluaran dibuka dan membuat vektor mentah R secara internal. Vektor mentah dapat diambil melalui rawConnectionValue. Jika koneksi terbuka untuk input dan output, vektor mentah awal yang disediakan akan disalin saat koneksi terbuka

Contoh

Example
R
# NOT RUN {
zz <- rawConnection(raw(0), "r+") # start with empty raw vector
writeBin(LETTERS, zz)
seek(zz, 0)
readLines(zz) # raw vector has embedded nuls
seek(zz, 0)
writeBin(letters[1:3], zz)
rawConnectionValue(zz)
close(zz)
# }

See Also

connections showConnections.