scan.vector: R Utilities: Scan a Character Vector

View source: R/scan.vec.R

scan.vecR Documentation

R Utilities: Scan a Character Vector

Description

The function scan.vec function splits a string into a character vector. The function scan0 is the base::scan function using the default what="character".

Usage

scan.vec(vec)
scan.vector(vec)

scan0(file="", ...)

Arguments

vec

A string which should be split according to blanks

file

File to be scanned. See base::scan.

...

Further arguments to be passed. See base::scan.

See Also

base::scan

Examples

#############################################################################
# EXAMPLE 1: Example scan.vec | reading a string
#############################################################################


vars <- miceadds::scan.vector( "urbgrad \n  groesse  \t  Nausg  grpgroesse   privat  ")
vars
  ## [1] "urbgrad"    "groesse"    "Nausg"      "grpgroesse"
  ## [6] "privat"

## the next lines are only commented out to fulfill CRAN checks
## vars2 <- miceadds::scan0()
##     female urbgrad  groesse  Nausg    grpgroesse   privat

miceadds documentation built on May 29, 2024, 11:05 a.m.