scan.vector: R Utilities: Scan a Character Vector

Description Usage Arguments See Also Examples

View source: R/scan0.R

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

1
2
3
4

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#############################################################################
# EXAMPLE 1: Example scan.vec | reading a string
#############################################################################

vars <- miceadds::scan.vector( "female urbgrad  groesse  Nausg    grpgroesse   privat  ")
vars
  ## [1] "female"     "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 June 6, 2018, 5:04 p.m.