scan.vector: R Utilities: Scan a Character Vector

Description Usage Arguments Author(s) See Also Examples

View source: R/scan0.R

Description

The functioon 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 splitted according to blanks

file

File to be scanned. See base::scan.

...

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

Author(s)

Alexander Robitzsch

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 May 19, 2017, 7:26 a.m.

Search within the miceadds package
Search all R packages, documentation and source code